summaryrefslogtreecommitdiff
path: root/ext/phar/tests/zip/open_for_write_newfile_c.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tests/zip/open_for_write_newfile_c.phpt')
-rw-r--r--ext/phar/tests/zip/open_for_write_newfile_c.phpt17
1 files changed, 5 insertions, 12 deletions
diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
index f927a618cc..1c2d345050 100644
--- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt
+++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt
@@ -23,33 +23,26 @@ $files['b.php'] = '<?php echo "This is b\n"; ?>';
$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
foreach ($files as $n => $file) {
- $phar[$n] = $file;
+ $phar[$n] = $file;
}
$phar->stopBuffering();
ini_set('phar.readonly', 1);
-$fp = fopen($alias . '/b/new.php', 'wb');
-fwrite($fp, 'extra');
-fclose($fp);
+var_dump(fopen($alias . '/b/new.php', 'wb'));
include $alias . '/b/c.php';
include $alias . '/b/new.php';
?>
-===DONE===
--CLEAN--
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?>
--EXPECTF--
-Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fwrite() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
-
-Warning: fclose() expects parameter 1 to be resource, bool given in %sopen_for_write_newfile_c.php on line %d
+Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): Failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d
+bool(false)
This is b/c
-Warning: include(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.zip" in %sopen_for_write_newfile_c.php on line %d
+Warning: include(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): Failed to open stream: phar error: "b/new.php" is not a file in phar "%sopen_for_write_newfile_c.phar.zip" in %sopen_for_write_newfile_c.php on line %d
Warning: include(): Failed opening 'phar://%sopen_for_write_newfile_c.phar.zip/b/new.php' for inclusion (include_path='%s') in %sopen_for_write_newfile_c.php on line %d
-===DONE===