Annotation of embedaddon/php/ext/spl/tests/observer_009.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SPL: SplObjectStorage addAll/removeAll
! 3: --FILE--
! 4: <?php
! 5: class Foo {}
! 6:
! 7: $storageA = new \SplObjectStorage();
! 8: $storageA->attach(new \Foo);
! 9: $storageA->attach(new \Foo);
! 10:
! 11: echo ("Count storage A: " . count($storageA));
! 12: foreach ($storageA as $object) {
! 13: echo ' x ';
! 14: }
! 15:
! 16: echo "\n";
! 17: $storageB = clone $storageA;
! 18:
! 19: echo ("Count storage B: " . count($storageB));
! 20: foreach ($storageB as $object) {
! 21: echo ' x ';
! 22: }
! 23: echo "\n";
! 24: ?>
! 25: ===DONE===
! 26: <?php exit(0); ?>
! 27: --EXPECTF--
! 28: Count storage A: 2 x x
! 29: Count storage B: 2 x x
! 30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>