summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMagnus Walbeck <mw@mwalbeck.org>2017-01-23 13:28:35 +0100
committerMagnus Walbeck <mw@mwalbeck.org>2017-01-23 13:28:35 +0100
commiteadc1ac6378995beb17c983729127b8bdf1b122a (patch)
tree518ed239598deab62bb65ca68d03785bef12cd30 /tests
parent5d486478d3d6d316b1895ea440a05f31488e2f9f (diff)
downloadnextcloud-server-eadc1ac6378995beb17c983729127b8bdf1b122a.tar.gz
nextcloud-server-eadc1ac6378995beb17c983729127b8bdf1b122a.zip
Mimetype detection for hidden files
Signed-off-by: Magnus Walbeck <mw@mwalbeck.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Type/DetectionTest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php
index 87e0f94e3e2..5c1f48a806e 100644
--- a/tests/lib/Files/Type/DetectionTest.php
+++ b/tests/lib/Files/Type/DetectionTest.php
@@ -74,9 +74,13 @@ class DetectionTest extends \Test\TestCase {
$this->assertEquals('text/plain', $this->detection->detectPath('foo.txt'));
$this->assertEquals('image/png', $this->detection->detectPath('foo.png'));
$this->assertEquals('image/png', $this->detection->detectPath('foo.bar.png'));
+ $this->assertEquals('image/png', $this->detection->detectPath('.hidden.png'));
+ $this->assertEquals('image/png', $this->detection->detectPath('.hidden.foo.png'));
$this->assertEquals('image/png', $this->detection->detectPath('.hidden/foo.png'));
+ $this->assertEquals('image/png', $this->detection->detectPath('.hidden/.hidden.png'));
$this->assertEquals('image/png', $this->detection->detectPath('test.jpg/foo.png'));
$this->assertEquals('application/octet-stream', $this->detection->detectPath('.png'));
+ $this->assertEquals('application/octet-stream', $this->detection->detectPath('..hidden'));
$this->assertEquals('application/octet-stream', $this->detection->detectPath('foo'));
$this->assertEquals('application/octet-stream', $this->detection->detectPath(''));
}