diff options
| author | Anatoliy Belsky <ab@php.net> | 2012-05-10 17:35:09 +0200 |
|---|---|---|
| committer | Anatoliy Belsky <ab@php.net> | 2012-05-10 17:35:09 +0200 |
| commit | d0d7340d50f178691c8e436391168cf6cc1fea3e (patch) | |
| tree | 8f6d0c8940ff38940042598fdb143a1e87b4a8ff | |
| parent | 27685b7bb537b2a1113e0877a89ff863dea55827 (diff) | |
| parent | b43d6c852238de8c3e010bb4a5041e9c03e4db2c (diff) | |
| download | php-git-d0d7340d50f178691c8e436391168cf6cc1fea3e.tar.gz | |
Merge branch 'PHP-5.4'
* PHP-5.4:
Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
| -rw-r--r-- | ext/standard/tests/general_functions/bug44295-win.phpt | 29 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/bug44295.phpt | 5 |
2 files changed, 33 insertions, 1 deletions
diff --git a/ext/standard/tests/general_functions/bug44295-win.phpt b/ext/standard/tests/general_functions/bug44295-win.phpt new file mode 100644 index 0000000000..d210a54d51 --- /dev/null +++ b/ext/standard/tests/general_functions/bug44295-win.phpt @@ -0,0 +1,29 @@ +--TEST-- +user defined error handler + set_error_handling(EH_THROW) +--SKIPIF-- +<?php + if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only"); + if (!extension_loaded("spl") || is_dir('c:\\not\\exists\\here')) die("skip"); +?> +--FILE-- +<?php +$dir = 'c:\\not\\exists\\here'; + +set_error_handler('my_error_handler'); +function my_error_handler() {$a = func_get_args(); print "in error handler\n"; } + +try { + print "before\n"; + $iter = new DirectoryIterator($dir); + print get_class($iter) . "\n"; + print "after\n"; +} catch (Exception $e) { + print "in catch: ".$e->getMessage()."\n"; +} +?> +==DONE== +<?php exit(0); ?> +--EXPECT-- +before +in catch: DirectoryIterator::__construct(c:\not\exists\here,c:\not\exists\here): The system cannot find the path specified. (code: 3) +==DONE== diff --git a/ext/standard/tests/general_functions/bug44295.phpt b/ext/standard/tests/general_functions/bug44295.phpt index 9c12719912..a184719193 100644 --- a/ext/standard/tests/general_functions/bug44295.phpt +++ b/ext/standard/tests/general_functions/bug44295.phpt @@ -1,7 +1,10 @@ --TEST-- user defined error handler + set_error_handling(EH_THROW) --SKIPIF-- -<?php if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip"); ?> +<?php + if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows"); + if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip"); +?> --FILE-- <?php $dir = '/this/path/does/not/exist'; |
