summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt')
-rw-r--r--ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
new file mode 100644
index 0000000000..7b2be18900
--- /dev/null
+++ b/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
@@ -0,0 +1,13 @@
+--TEST--
+SPL: Spl File Info test getExtension with leading dot
+--FILE--
+<?php
+$file = __DIR__ . '/.test';
+touch($file);
+$fileInfo = new SplFileInfo($file);
+
+var_dump($fileInfo->getExtension());
+unlink($file);
+?>
+--EXPECT--
+string(4) "test"