summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2019-08-29 01:35:29 +0200
committerJoe Watkins <krakjoe@php.net>2019-08-30 09:50:04 +0200
commit1f647ab4caf6b095759a65d2c31becc26938c3d8 (patch)
tree3cbf67a7d3ef4d5cea9f936d13f0852119d00caf
parentb3d725218d881cb26028af04140f66617df3a06a (diff)
downloadphp-git-1f647ab4caf6b095759a65d2c31becc26938c3d8.tar.gz
Move and fix scandir related bug test
-rw-r--r--ext/standard/tests/dir/bug41693.phpt14
-rw-r--r--ext/standard/tests/file/bug41693.phpt13
2 files changed, 14 insertions, 13 deletions
diff --git a/ext/standard/tests/dir/bug41693.phpt b/ext/standard/tests/dir/bug41693.phpt
new file mode 100644
index 0000000000..c42ca2faea
--- /dev/null
+++ b/ext/standard/tests/dir/bug41693.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #41693 (scandir() allows empty directory names)
+--FILE--
+<?php
+
+try {
+ var_dump(scandir(''));
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
+
+?>
+--EXPECT--
+Directory name cannot be empty
diff --git a/ext/standard/tests/file/bug41693.phpt b/ext/standard/tests/file/bug41693.phpt
deleted file mode 100644
index ea074fa4fd..0000000000
--- a/ext/standard/tests/file/bug41693.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Bug #41693 (scandir() allows empty directory names)
---FILE--
-<?php
-
-var_dump(scandir(''));
-
-echo "Done\n";
-?>
---EXPECTF--
-Warning: scandir(): Directory name cannot be empty in %s on line %d
-bool(false)
-Done