summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/bug43353-win32.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file/bug43353-win32.phpt')
-rw-r--r--ext/standard/tests/file/bug43353-win32.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/standard/tests/file/bug43353-win32.phpt b/ext/standard/tests/file/bug43353-win32.phpt
new file mode 100644
index 0000000..0667f69
--- /dev/null
+++ b/ext/standard/tests/file/bug43353-win32.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #43353 wrong detection of 'data' wrapper
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip Run only on Windows");
+?>
+--INI--
+allow_url_fopen=1
+--FILE--
+<?php
+
+var_dump(is_dir('file:///datafoo:test'));
+var_dump(is_dir('datafoo:test'));
+var_dump(file_get_contents('data:text/plain,foo'));
+var_dump(file_get_contents('datafoo:text/plain,foo'));
+
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+string(3) "foo"
+
+Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: Invalid argument in %s
+bool(false)