diff options
author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:37 -0400 |
---|---|---|
committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:37 -0400 |
commit | 10f5b47dc7c1cf2b9a00991629f43652710322d3 (patch) | |
tree | 3b727a16f652b8042d573e90f003868ffb3b56c7 /tests | |
parent | 0e920280a2e04b110827bb766b9f29e3d581c4ee (diff) | |
download | php-10f5b47dc7c1cf2b9a00991629f43652710322d3.tar.gz |
Imported Upstream version 5.0.5upstream/5.0.5
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/basic/bug29971.phpt | 15 | ||||
-rw-r--r-- | tests/classes/abstract_derived.phpt | 2 | ||||
-rw-r--r-- | tests/classes/abstract_not_declared.phpt | 2 | ||||
-rw-r--r-- | tests/classes/abstract_redeclare.phpt | 2 | ||||
-rwxr-xr-x | tests/classes/clone_006.phpt | 2 | ||||
-rw-r--r-- | tests/classes/interface_must_be_implemented.phpt | 4 | ||||
-rw-r--r-- | tests/classes/interfaces_002.phpt | 6 | ||||
-rw-r--r-- | tests/lang/bug20175.phpt | 7 | ||||
-rw-r--r-- | tests/lang/bug21600.phpt | 9 | ||||
-rwxr-xr-x | tests/lang/bug25922.phpt | 2 | ||||
-rw-r--r-- | tests/lang/bug32828.phpt | 21 | ||||
-rw-r--r-- | tests/strings/004.phpt | 4 | ||||
-rw-r--r-- | tests/strings/bug26703.phpt | 2 |
13 files changed, 63 insertions, 15 deletions
diff --git a/tests/basic/bug29971.phpt b/tests/basic/bug29971.phpt new file mode 100755 index 000000000..d4b654bdb --- /dev/null +++ b/tests/basic/bug29971.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #29971 (variables_order behaviour) +--INI-- +variables_order=GPC +--FILE-- +<?php +var_dump($_ENV,$_SERVER); +var_dump(ini_get("variables_order")); +?> +--EXPECT-- +array(0) { +} +array(0) { +} +string(3) "GPC" diff --git a/tests/classes/abstract_derived.phpt b/tests/classes/abstract_derived.phpt index 81cb3341e..0feceac6b 100644 --- a/tests/classes/abstract_derived.phpt +++ b/tests/classes/abstract_derived.phpt @@ -17,4 +17,4 @@ class derived extends base { <?php exit(0); ?> --EXPECTF-- -Fatal error: Class derived contains 1 abstract methods and must therefore be declared abstract (derived::show) in %sabstract_derived.php on line %d +Fatal error: Class derived contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (derived::show) in %sabstract_derived.php on line %d diff --git a/tests/classes/abstract_not_declared.phpt b/tests/classes/abstract_not_declared.phpt index 96c98857e..3b81cd498 100644 --- a/tests/classes/abstract_not_declared.phpt +++ b/tests/classes/abstract_not_declared.phpt @@ -12,4 +12,4 @@ class fail { echo "Done\n"; // shouldn't be displayed ?> --EXPECTF-- -Fatal error: Class fail contains 1 abstract methods and must therefore be declared abstract (fail::show) in %s on line %d +Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::show) in %s on line %d diff --git a/tests/classes/abstract_redeclare.phpt b/tests/classes/abstract_redeclare.phpt index 716dd17fd..9a0a1edc3 100644 --- a/tests/classes/abstract_redeclare.phpt +++ b/tests/classes/abstract_redeclare.phpt @@ -19,4 +19,4 @@ echo "Done\n"; // Shouldn't be displayed ?> --EXPECTF-- -Fatal error: Class fail contains 1 abstract methods and must therefore be declared abstract (fail::show) in %sabstract_redeclare.php on line %d +Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::show) in %sabstract_redeclare.php on line %d diff --git a/tests/classes/clone_006.phpt b/tests/classes/clone_006.phpt index 346911ad0..de22fec15 100755 --- a/tests/classes/clone_006.phpt +++ b/tests/classes/clone_006.phpt @@ -2,6 +2,8 @@ ZE2 object cloning, 6 --SKIPIF-- <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> +--INI-- +error_reporting=2047 --FILE-- <?php diff --git a/tests/classes/interface_must_be_implemented.phpt b/tests/classes/interface_must_be_implemented.phpt index 82ddf24df..a4d79704e 100644 --- a/tests/classes/interface_must_be_implemented.phpt +++ b/tests/classes/interface_must_be_implemented.phpt @@ -6,7 +6,7 @@ ZE2 An interface must be implemented <?php interface if_a { - abstract function f_a(); + function f_a(); } class derived_a implements if_a { @@ -14,4 +14,4 @@ class derived_a implements if_a { ?> --EXPECTF-- -Fatal error: Class derived_a contains 1 abstract methods and must therefore be declared abstract (if_a::f_a) in %s on line %d +Fatal error: Class derived_a contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (if_a::f_a) in %s on line %d diff --git a/tests/classes/interfaces_002.phpt b/tests/classes/interfaces_002.phpt index 66d46f5d3..d26b5349b 100644 --- a/tests/classes/interfaces_002.phpt +++ b/tests/classes/interfaces_002.phpt @@ -20,10 +20,10 @@ class Exception_foo implements Throwable { // this should die -- Exception class must be abstract... $foo = new Exception_foo; -echo $foo->getMessage() . "\n"; +echo "Message: " . $foo->getMessage() . "\n"; ?> +===DONE=== --EXPECTF-- -Fatal error: Class Exception_foo contains 1 abstract methods and must therefore be declared abstract (Throwable::getErrno) in %s on line %d - +Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Throwable::getErrno) in %s on line %d diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt index 55ff7d82b..d2248e6f0 100644 --- a/tests/lang/bug20175.phpt +++ b/tests/lang/bug20175.phpt @@ -2,6 +2,8 @@ Bug #20175 (Static vars can't store ref to new instance) --SKIPIF-- <?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip ZE1 does not have static class members'); ?> +--INI-- +error_reporting=4095 --FILE-- <?php print zend_version()."\n"; @@ -145,10 +147,11 @@ foo_static() foo:1 bar_static() bar_global() + +Strict Standards: Only variables should be assigned by reference in %sbug20175.php on line 47 bar:1 bar_static() -bar_global() -bar:2 +bar:1 wow_static() wow_global() wow:1 diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt index c3f832b9e..6ecf69a11 100644 --- a/tests/lang/bug21600.phpt +++ b/tests/lang/bug21600.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #21600 (assign by reference function call changes variable contents) +--INI-- +error_reporting=4095 --FILE-- <?php $tmp = array(); @@ -23,11 +25,14 @@ function fubar($text){ return $text; } ?> ---EXPECT-- +--EXPECTF-- +Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4 array(1) { ["foo"]=> - &string(4) "test" + string(4) "test" } + +Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11 array(1) { ["foo"]=> string(4) "test" diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt index 0588eef94..bb030c9df 100755 --- a/tests/lang/bug25922.phpt +++ b/tests/lang/bug25922.phpt @@ -6,6 +6,7 @@ error_reporting=2047 <?php function my_error_handler($error, $errmsg='', $errfile='', $errline=0, $errcontext='') { + echo "$errmsg\n"; $errcontext = ''; } @@ -18,4 +19,5 @@ function test() test(); ?> --EXPECT-- +Undefined variable: data Undefined index here: '' diff --git a/tests/lang/bug32828.phpt b/tests/lang/bug32828.phpt new file mode 100644 index 000000000..ad59646f5 --- /dev/null +++ b/tests/lang/bug32828.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #32828 (Throwing exception in output_callback function with ob_start and ob_end_clean leads to segfault) +--FILE-- +<?php + +function output_handler($buffer) +{ + throw new Exception; +} + +ob_start('output_handler'); + +ob_end_clean(); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'Exception' in %s:%d +Stack trace: +#0 [internal function]: output_handler('', %d) +#1 %s(%d): ob_end_clean() +#2 {main} + thrown in %s on line %d diff --git a/tests/strings/004.phpt b/tests/strings/004.phpt index ac5e2ce43..a283fda69 100644 --- a/tests/strings/004.phpt +++ b/tests/strings/004.phpt @@ -15,8 +15,8 @@ echo "\n[$var]\n"; ?> --EXPECT-- <code><span style="color: #000000"> -<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span> +<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"foo"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span> </code> [<code><span style="color: #000000"> -<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"bar"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span> +<br /><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"bar"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span><br /></span> </code>] diff --git a/tests/strings/bug26703.phpt b/tests/strings/bug26703.phpt index c9a7790c0..f21bcb900 100644 --- a/tests/strings/bug26703.phpt +++ b/tests/strings/bug26703.phpt @@ -13,6 +13,6 @@ highlight.html=#000000 ?> --EXPECT-- <code><span style="color: #000000"> -<span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"foo[] $a \n"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span> +<span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"foo[] $a \n"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span> </span> </code> |