From 5dfcb7dee033b2351a1c54cd6a4cec233e1be6fc Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 6 Nov 2007 15:29:32 +0000 Subject: [PATCH] - MFB Add tests --- ext/spl/tests/bug38325.phpt | 11 +++++++++++ ext/spl/tests/bug40091.phpt | 39 +++++++++++++++++++++++++++++++++++++ ext/spl/tests/bug40442.phpt | 12 ++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 ext/spl/tests/bug38325.phpt create mode 100644 ext/spl/tests/bug40091.phpt create mode 100755 ext/spl/tests/bug40442.phpt diff --git a/ext/spl/tests/bug38325.phpt b/ext/spl/tests/bug38325.phpt new file mode 100644 index 00000000000..126e1f3c023 --- /dev/null +++ b/ext/spl/tests/bug38325.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #38325 (spl_autoload_register() gaves wrong line for "class not found") +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Fatal error: spl_autoload(): Class Foo could not be loaded in %s on line 3 diff --git a/ext/spl/tests/bug40091.phpt b/ext/spl/tests/bug40091.phpt new file mode 100644 index 00000000000..7d6210b8bb5 --- /dev/null +++ b/ext/spl/tests/bug40091.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #40091 (issue with spl_autoload_register() and 2 instances of the same class) +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- +Array +( + [0] => Array + ( + [0] => MyAutoloader + [1] => autoload + ) + + [1] => Array + ( + [0] => MyAutoloader + [1] => autoload + ) + +) +===DONE=== diff --git a/ext/spl/tests/bug40442.phpt b/ext/spl/tests/bug40442.phpt new file mode 100755 index 00000000000..fbeb22d2b32 --- /dev/null +++ b/ext/spl/tests/bug40442.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #40442 (ArrayObject::offsetExists broke in 5.2.1, works in 5.2.0) +--FILE-- +offsetSet('property', 0); +var_dump($a->offsetExists('property')); +?> +===DONE=== +--EXPECT-- +bool(true) +===DONE===