diff options
Diffstat (limited to 'ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt')
-rw-r--r-- | ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt new file mode 100644 index 0000000..4c2dd75 --- /dev/null +++ b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt @@ -0,0 +1,19 @@ +--TEST-- +Check that SplObjectStorage::unserialize throws exception when NULL passed +--CREDITS-- +PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com) +--FILE-- +<?php + +$s = new SplObjectStorage(); + +try { + $s->unserialize(NULL); +} catch(UnexpectedValueException $e) { + echo $e->getMessage(); +} + +?> +--EXPECTF-- +Empty serialized string cannot be empty + |