Skip to content

Commit 74bd4f0

Browse files
committed
Commit unit test of spl_object_id
1 parent 92c1158 commit 74bd4f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ext/spl/tests/spl_object_id.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
SPL: spl_object_id()
3+
--FILE--
4+
<?php
5+
6+
var_dump(spl_object_id(new stdClass));
7+
var_dump(spl_object_id(42));
8+
var_dump(spl_object_id());
9+
$a = new stdClass();
10+
var_dump(spl_object_id(new stdClass) === spl_object_id($a));
11+
12+
?>
13+
===DONE===
14+
<?php exit(0); ?>
15+
--EXPECTF--
16+
int(%d)
17+
18+
Warning: spl_object_id() expects parameter 1 to be object, integer given in %sspl_object_id.php on line %d
19+
NULL
20+
21+
Warning: spl_object_id() expects exactly 1 parameter, 0 given in %sspl_object_id.php on line %d
22+
NULL
23+
bool(false)
24+
===DONE===

0 commit comments

Comments
 (0)