diff options
author | Derick Rethans <derick@php.net> | 2003-01-01 12:43:59 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2003-01-01 12:43:59 +0000 |
commit | 6197460836021d8ac3d4f38e1c73de03bb7945f0 (patch) | |
tree | cc90fc2466fc5d1e335b03ae10902faf884e6246 | |
parent | 9b09ba614df58aaff97206bc05ffb06f4d57f93f (diff) | |
download | php-git-6197460836021d8ac3d4f38e1c73de03bb7945f0.tar.gz |
- Fix tests if Zend Optimizer is loaded
-rw-r--r-- | tests/run-test/test005.phpt | 6 | ||||
-rw-r--r-- | tests/run-test/test008.phpt | 33 |
2 files changed, 38 insertions, 1 deletions
diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt index 04f62105a4..65459f8f86 100644 --- a/tests/run-test/test005.phpt +++ b/tests/run-test/test005.phpt @@ -1,5 +1,9 @@ --TEST-- -Error message handling +Error message handling (without ZendOptimizer) +--SKIPIF-- +<?php +!extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is loaded"); +?> --FILE-- <?php // If this test fails ask the developers of run-test.php diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt new file mode 100644 index 0000000000..b9ac6404ca --- /dev/null +++ b/tests/run-test/test008.phpt @@ -0,0 +1,33 @@ +--TEST-- +Error message handling (with ZendOptimizer) +--SKIPIF-- +<?php +extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is loaded"); +?> +--FILE-- +<?php +// If this test fails ask the developers of run-test.php +// +// We check the general ini settings which affect error handling +// and than verify if a message is given by a division by zero. +// EXPECTF is used here since the error format may change but ut +// should always contain 'Division by zero'. +var_dump(ini_get('display_errors')); +var_dump(ini_get('error_reporting')); +var_dump(ini_get('log_errors')); +var_dump(ini_get('track_errors')); +ini_set('display_errors', 0); +var_dump(ini_get('display_errors')); +var_dump($php_errormsg); +$error = 1 / 0; +var_dump($php_errormsg); +?> +--EXPECTF-- +%s: %sivision by zero in %s on line %d +string(1) "1" +string(4) "2047" +string(1) "0" +string(1) "1" +string(1) "0" +string(%d) "%sivision by zer%s" +string(%d) "%sivision by zer%s" |