Add test covering for #47671

This commit is contained in:
Etienne Kneuss 2009-03-19 02:46:41 +00:00
parent 47aa4817f3
commit 24835e7fb1

View file

@ -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===