Browse Source

MFH: Add test covering for #47671

experimental/5.3-FPM
Etienne Kneuss 18 years ago
parent
commit
c44d7b3576
  1. 30
      ext/spl/tests/observer_009.phpt

30
ext/spl/tests/observer_009.phpt

@ -0,0 +1,30 @@
--TEST--
SPL: SplObjectStorage addAll/removeAll
--FILE--
<?php
class Foo {}
$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);
echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
echo ' x ';
}
echo "\n";
$storageB = clone $storageA;
echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
echo ' x ';
}
echo "\n";
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
Count storage A: 2 x x
Count storage B: 2 x x
===DONE===
Loading…
Cancel
Save