From: Greg Beaver Date: Sun, 20 Apr 2008 04:35:14 +0000 (+0000) Subject: fix fopen test problem - behavior is slightly different from PHP 5.2 -> PHP 5.3 X-Git-Tag: RELEASE_2_0_0b1~310 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50962003e08faa6df18eaa29df5562afc18496e5;p=php fix fopen test problem - behavior is slightly different from PHP 5.2 -> PHP 5.3 now all tests pass on windows on my box --- diff --git a/ext/phar/tests/fopen.phpt b/ext/phar/tests/fopen.phpt index 4184d416a2..5b694d6e2d 100644 --- a/ext/phar/tests/fopen.phpt +++ b/ext/phar/tests/fopen.phpt @@ -2,6 +2,7 @@ Phar: test fopen() interception --SKIPIF-- += 5.3 required for this test");?> --INI-- phar.require_hash=1 phar.readonly=0 diff --git a/ext/phar/tests/fopen5.2.phpt b/ext/phar/tests/fopen5.2.phpt new file mode 100644 index 0000000000..aa064f1662 --- /dev/null +++ b/ext/phar/tests/fopen5.2.phpt @@ -0,0 +1,43 @@ +--TEST-- +Phar: test fopen() interception +--SKIPIF-- + + +--INI-- +phar.require_hash=1 +phar.readonly=0 +--FILE-- +'; +$a['dir/file1.txt'] = 'hi'; +$a['dir/file2.txt'] = 'hi2'; +$a['dir/file3.txt'] = 'hi3'; +$a->setStub(' +===DONE=== +--CLEAN-- + +--EXPECTF-- +Warning: fopen() expects at least 2 parameters, 0 given in %sfopen5.2.php on line %d +hihi +Warning: fopen(phar://%sfopen5.2.phar.php/notfound.txt): failed to open stream: phar error: "notfound.txt" is not a file in phar "%sfopen5.2.phar.php" in phar://%sfopen5.2.phar.php/index.php on line %d +===DONE=== \ No newline at end of file