]> granicus.if.org Git - php/commitdiff
added test for bug #47517
authorAnatol Belski <ab@php.net>
Thu, 2 Jun 2016 21:06:20 +0000 (23:06 +0200)
committerAnatol Belski <ab@php.net>
Thu, 2 Jun 2016 21:06:20 +0000 (23:06 +0200)
ext/standard/tests/file/bug47517.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/file/bug47517.phpt b/ext/standard/tests/file/bug47517.phpt
new file mode 100644 (file)
index 0000000..97f387c
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+Bug #47517 test registry virtualization disabled
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+    die('skip only for Windows');
+}
+?>
+--FILE--
+<?php
+/* This has to behave same way on both 64- and 32-bits. */
+file_put_contents('C:\Program Files\myfile.txt', 'hello');
+?>
+==DONE==
+--EXPECTF--
+Warning: file_put_contents(C:\Program Files\myfile.txt): failed to open stream: Permission denied in %sbug47517.php on line %d
+==DONE==