summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-12-19 22:27:13 -0500
committerFrederic Guillot <fred@kanboard.net>2016-12-19 22:27:13 -0500
commit07c44d2113ee2fe67d6bdaf0018b321b1a6ebc9f (patch)
tree0e71a12e86ffb65c1b4e8e39e752488c5f9968d2 /tests/units
parenteed51aef63d55d8906f3f0e6c707ef1f1739d5ff (diff)
Avoid code duplication in PR #2891
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Helper/FileHelperTest.php (renamed from tests/units/Helper/FileHelperText.php)9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/units/Helper/FileHelperText.php b/tests/units/Helper/FileHelperTest.php
index 215b024b..7db43460 100644
--- a/tests/units/Helper/FileHelperText.php
+++ b/tests/units/Helper/FileHelperTest.php
@@ -30,7 +30,14 @@ class FileHelperTest extends Base
$helper = new FileHelper($this->container);
$this->assertEquals('text', $helper->getPreviewType('test.txt'));
$this->assertEquals('markdown', $helper->getPreviewType('test.markdown'));
- $this->assertEquals('md', $helper->getPreviewType('test.md'));
+ $this->assertEquals('markdown', $helper->getPreviewType('test.md'));
$this->assertEquals(null, $helper->getPreviewType('test.doc'));
}
+
+ public function testGetBrowserViewType()
+ {
+ $fileHelper = new FileHelper($this->container);
+ $this->assertSame('application/pdf', $fileHelper->getBrowserViewType('SomeFile.PDF'));
+ $this->assertSame(null, $fileHelper->getBrowserViewType('SomeFile.doc'));
+ }
}