blob: 2c6bc6ad9cc1a75bb9abb681a9d8b19e10c9fc4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
require_once __DIR__.'/../Base.php';
use Kanboard\Helper\File;
class FileHelperTest extends Base
{
public function testIcon()
{
$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'));
}
}
|