1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/spl/tests/SplObjectStorage/SplObjectStorage_removeAllExcept_basic.phpt

28 lines
496 B
PHP

--TEST--
Check that SplObjectStorage::removeUncommon functions when receiving proper input
--CREDITS--
Matthew Turland (me@matthewturland.com)
--FILE--
<?php
$a = (object) 'a';
$b = (object) 'b';
$c = (object) 'c';
$foo = new SplObjectStorage;
$foo->offsetSet($a);
$foo->offsetSet($b);
$bar = new SplObjectStorage;
$bar->offsetSet($b);
$bar->offsetSet($c);
$foo->removeAllExcept($bar);
var_dump($foo->offsetExists($a));
var_dump($foo->offsetExists($b));
?>
--EXPECT--
bool(false)
bool(true)