diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-09-19 15:41:44 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 11:31:03 +0200 |
commit | 9b4de310bdfc3eeaafd236124cb17ee58d11c852 (patch) | |
tree | ee929c2446d2c5289dd019cdd0be2bb158427dbc /tests | |
parent | 244de6451b22a1288d3ef698f48fb9c4e78bf15f (diff) | |
download | nextcloud-server-9b4de310bdfc3eeaafd236124cb17ee58d11c852.tar.gz nextcloud-server-9b4de310bdfc3eeaafd236124cb17ee58d11c852.zip |
Fix mimetype detection inside hidden folders (#26138)
Downstreaming of https://github.com/owncloud/core/pull/26138
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/Type/DetectionTest.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 11267ee2e7d..87e0f94e3e2 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -74,6 +74,8 @@ 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/foo.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('foo')); $this->assertEquals('application/octet-stream', $this->detection->detectPath('')); |