Annotation of embedaddon/php/ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Check that SplObjectStorage::attach generates a warning and returns NULL when bad params are passed
3: --CREDITS--
4: PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
5: --FILE--
6: <?php
7:
8: $s = new SplObjectStorage();
9:
10: var_dump($s->attach(true));
11: var_dump($s->attach(new stdClass, true, true));
12:
13: ?>
14: --EXPECTF--
15: Warning: SplObjectStorage::attach() expects parameter 1 to be object, boolean given in %s on line %d
16: NULL
17:
18: Warning: SplObjectStorage::attach() expects at most 2 parameters, 3 given in %s on line %d
19: NULL
20:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>