diff options
| author | Marcus Boerger <helly@php.net> | 2005-01-27 00:34:13 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-01-27 00:34:13 +0000 |
| commit | 5cabd2f12bf78a04f4a9303b52687e1e8cf8f347 (patch) | |
| tree | 9c10e299e03a0a213e79d2c0d6f8b123209b9bfc /ext/spl/examples | |
| parent | faba10853f4939d0fdb04f647d38887c150204da (diff) | |
| download | php-git-5cabd2f12bf78a04f4a9303b52687e1e8cf8f347.tar.gz | |
- Move tests to proper location now that the tested classes are hardcoded
Diffstat (limited to 'ext/spl/examples')
| -rwxr-xr-x | ext/spl/examples/tests/iterators_001.phpt | 20 | ||||
| -rwxr-xr-x | ext/spl/examples/tests/iterators_002.phpt | 53 | ||||
| -rwxr-xr-x | ext/spl/examples/tests/iterators_003.phpt | 35 | ||||
| -rwxr-xr-x | ext/spl/examples/tests/iterators_004.phpt | 68 |
4 files changed, 0 insertions, 176 deletions
diff --git a/ext/spl/examples/tests/iterators_001.phpt b/ext/spl/examples/tests/iterators_001.phpt deleted file mode 100755 index 5b4a6ffd0f..0000000000 --- a/ext/spl/examples/tests/iterators_001.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -SPL: EmptyIterator ---FILE-- -<?php - -require_once('examples.inc'); - -echo "===EmptyIterator===\n"; - -foreach(new LimitIterator(new EmptyIterator(), 0, 3) as $key => $val) -{ - echo "$key=>$val\n"; -} - -?> -===DONE=== -<?php exit(0); ---EXPECTF-- -===EmptyIterator=== -===DONE=== diff --git a/ext/spl/examples/tests/iterators_002.phpt b/ext/spl/examples/tests/iterators_002.phpt deleted file mode 100755 index dcbaa9c875..0000000000 --- a/ext/spl/examples/tests/iterators_002.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -SPL: InfiniteIterator ---FILE-- -<?php - -require_once('examples.inc'); - -echo "===EmptyIterator===\n"; - -foreach(new LimitIterator(new InfiniteIterator(new EmptyIterator()), 0, 3) as $key=>$val) -{ - echo "$key=>$val\n"; -} - -echo "===InfiniteIterator===\n"; - -$it = new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D')); -$it = new InfiniteIterator($it); -$it = new LimitIterator($it, 2, 5); -foreach($it as $val=>$key) -{ - echo "$val=>$key\n"; -} - -echo "===Infinite/LimitIterator===\n"; - -$it = new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C', 3 => 'D')); -$it = new LimitIterator($it, 1, 2); -$it = new InfiniteIterator($it); -$it = new LimitIterator($it, 2, 5); -foreach($it as $val=>$key) -{ - echo "$val=>$key\n"; -} - -?> -===DONE=== -<?php exit(0); ---EXPECTF-- -===EmptyIterator=== -===InfiniteIterator=== -2=>C -3=>D -0=>A -1=>B -2=>C -===Infinite/LimitIterator=== -1=>B -2=>C -1=>B -2=>C -1=>B -===DONE=== diff --git a/ext/spl/examples/tests/iterators_003.phpt b/ext/spl/examples/tests/iterators_003.phpt deleted file mode 100755 index f6d047de75..0000000000 --- a/ext/spl/examples/tests/iterators_003.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -SPL: NoRweindIterator ---FILE-- -<?php - -require_once('examples.inc'); - -echo "===Current===\n"; - -$it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C'))); - -echo $it->key() . '=>' . $it->current() . "\n"; - -echo "===Next===\n"; - -$it->next(); - -echo "===Foreach===\n"; - -foreach($it as $key=>$val) -{ - echo "$key=>$val\n"; -} - -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -===Current=== -0=>A -===Next=== -===Foreach=== -1=>B -2=>C -===DONE=== diff --git a/ext/spl/examples/tests/iterators_004.phpt b/ext/spl/examples/tests/iterators_004.phpt deleted file mode 100755 index 83827e29ba..0000000000 --- a/ext/spl/examples/tests/iterators_004.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -SPL: AppendIterator ---FILE-- -<?php - -require_once('examples.inc'); - -echo "===Empty===\n"; - -$it = new AppendIterator; - -foreach($it as $key=>$val) -{ - echo "$key=>$val\n"; -} - -echo "===Append===\n"; - -$it->append(new ArrayIterator(array(0 => 'A', 1 => 'B'))); - -foreach($it as $key=>$val) -{ - echo "$key=>$val\n"; -} - -echo "===Rewind===\n"; - -foreach($it as $key=>$val) -{ - echo "$key=>$val\n"; -} - -echo "===Append===\n"; - -$it->append(new ArrayIterator(array(2 => 'C', 3 => 'D'))); - -foreach(new NoRewindIterator($it) as $key=>$val) -{ - echo "$key=>$val\n"; -} - -echo "===Rewind===\n"; - -foreach($it as $key=>$val) -{ - echo "$key=>$val\n"; -} - -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -===Empty=== -===Append=== -0=>A -1=>B -===Rewind=== -0=>A -1=>B -===Append=== -2=>C -3=>D -===Rewind=== -0=>A -1=>B -2=>C -3=>D -===DONE=== |
