From 376deb39d64f76a82b2182343e0b416c46feb661 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sun, 11 May 2008 19:41:45 +0000 Subject: [PATCH] split test into two versions for differences in parameter parsing in PHP 5.3+ --- ext/phar/tests/stat2.phpt | 3 +- ext/phar/tests/stat2_5.3.phpt | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 ext/phar/tests/stat2_5.3.phpt diff --git a/ext/phar/tests/stat2.phpt b/ext/phar/tests/stat2.phpt index 559a28d3f0..6e911028ca 100644 --- a/ext/phar/tests/stat2.phpt +++ b/ext/phar/tests/stat2.phpt @@ -1,7 +1,8 @@ --TEST-- -Phar: test stat function interceptions and is_file/is_link edge cases +Phar: test stat function interceptions and is_file/is_link edge cases (PHP 5.2) --SKIPIF-- + --INI-- phar.readonly=0 --FILE-- diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt new file mode 100644 index 0000000000..58ca54a16a --- /dev/null +++ b/ext/phar/tests/stat2_5.3.phpt @@ -0,0 +1,60 @@ +--TEST-- +Phar: test stat function interceptions and is_file/is_link edge cases (PHP 5.3+) +--SKIPIF-- + + +--INI-- +phar.readonly=0 +--FILE-- +convertToExecutable(Phar::TAR, Phar::NONE, '.3.phar.tar'); +unset($a); +Phar::unlinkArchive($fname2); +$b['foo/stat.php'] = ''; +$b->addEmptyDir('foo/bar/blah'); +$b->setStub(' +===DONE=== +--CLEAN-- + + +--EXPECTF-- +Warning: is_file() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d + +Warning: is_link() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d +bool(true) +is_link +bool(false) +bool(true) +bool(false) +bool(false) +bool(true) +string(4) "link" +string(3) "dir" +bool(true) +not found +bool(false) +dir +bool(true) +bool(false) +===DONE=== \ No newline at end of file -- 2.50.1