diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-16 21:12:43 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-16 21:12:43 -0500 |
commit | 8936792f6f7a408dae7e0a6a41274202822acd9c (patch) | |
tree | a07a005ef7095472f7a64779df85825fe30a97b2 /tests/units | |
parent | 5bbc903dcab12dcf53abc40bf67c2cd7898e0420 (diff) |
Add file attachements to projects
Diffstat (limited to 'tests/units')
-rw-r--r-- | tests/units/Helper/FileHelperText.php | 18 | ||||
-rw-r--r-- | tests/units/Model/TaskFileTest.php | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/units/Helper/FileHelperText.php b/tests/units/Helper/FileHelperText.php index a681c890..2c6bc6ad 100644 --- a/tests/units/Helper/FileHelperText.php +++ b/tests/units/Helper/FileHelperText.php @@ -8,8 +8,20 @@ class FileHelperTest extends Base { public function testIcon() { - $h = new File($this->container); - $this->assertEquals('fa-file-image-o', $h->icon('test.png')); - $this->assertEquals('fa-file-o', $h->icon('test')); + $helper = new File($this->container); + $this->assertEquals('fa-file-image-o', $helper->icon('test.png')); + $this->assertEquals('fa-file-o', $helper->icon('test')); + } + + public function testGetMimeType() + { + $helper = new File($this->container); + + $this->assertEquals('image/jpeg', $helper->getImageMimeType('My File.JPG')); + $this->assertEquals('image/jpeg', $helper->getImageMimeType('My File.jpeg')); + $this->assertEquals('image/png', $helper->getImageMimeType('My File.PNG')); + $this->assertEquals('image/gif', $helper->getImageMimeType('My File.gif')); + $this->assertEquals('image/jpeg', $helper->getImageMimeType('My File.bmp')); + $this->assertEquals('image/jpeg', $helper->getImageMimeType('My File')); } } diff --git a/tests/units/Model/TaskFileTest.php b/tests/units/Model/TaskFileTest.php index 753a1fb6..b7db96a9 100644 --- a/tests/units/Model/TaskFileTest.php +++ b/tests/units/Model/TaskFileTest.php @@ -124,18 +124,6 @@ class TaskFileTest extends Base $this->assertFalse($fileModel->isImage('test.pdf')); } - public function testGetMimeType() - { - $fileModel = new TaskFile($this->container); - - $this->assertEquals('image/jpeg', $fileModel->getImageMimeType('My File.JPG')); - $this->assertEquals('image/jpeg', $fileModel->getImageMimeType('My File.jpeg')); - $this->assertEquals('image/png', $fileModel->getImageMimeType('My File.PNG')); - $this->assertEquals('image/gif', $fileModel->getImageMimeType('My File.gif')); - $this->assertEquals('image/jpeg', $fileModel->getImageMimeType('My File.bmp')); - $this->assertEquals('image/jpeg', $fileModel->getImageMimeType('My File')); - } - public function testGetThumbnailPath() { $fileModel = new TaskFile($this->container); |