1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/spl/tests/observer_008.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

33 lines
432 B
PHP

--TEST--
SPL: SplObjectStorage addAll/removeAll
--FILE--
<?php
class A extends SplObjectStorage { }
$o1 = new StdClass;
$o2 = new StdClass;
$o3 = new StdClass;
$a = new A;
$a->attach($o1);
$a->attach($o2);
$b = new SplObjectSTorage();
$b->attach($o2);
$b->attach($o3);
$a->addAll($b);
var_dump($a->count());
$a->detach($o3);
var_dump($a->count());
$a->removeAll($b);
var_dump($a->count());
?>
--EXPECT--
int(3)
int(2)
int(1)