Test Failed
Push — master ( efd7d9...deb815 )
by Vítězslav
03:10
created

FormatsTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
/**
6
 * Generated by PHPUnit_SkeletonGenerator on 2017-06-25 at 23:33:48.
7
 */
8
class FormatsTest extends \PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * @var Formats
12
     */
13
    protected $object;
14
15
    /**
16
     * Tears down the fixture, for example, closes a network connection.
17
     * This method is called after a test is executed.
18
     */
19
    protected function tearDown()
20
    {
21
22
    }
23
24
    /**
25
     * @covers FlexiPeeHP\Formats::byContentType
26
     */
27
    public function testByContentType()
28
    {
29
        $contentTypes = \FlexiPeeHP\Formats::byContentType();
30
        $this->assertEquals('application/javascript', key($contentTypes));
31
    }
32
33
    /**
34
     * @covers FlexiPeeHP\Formats::bySuffix
35
     */
36
    public function testBySuffix()
37
    {
38
        $suffixes = \FlexiPeeHP\Formats::bySuffix();
39
        $this->assertEquals('js', key($suffixes));
40
    }
41
42
    /**
43
     * @covers FlexiPeeHP\Formats::suffixToContentType
44
     */
45
    public function testSuffixToContentType()
46
    {
47
        $this->assertEquals('application/pdf',
48
            \FlexiPeeHP\Formats::suffixToContentType('pdf'));
49
    }
50
51
    /**
52
     * @covers FlexiPeeHP\Formats::contentTypeToSuffix
53
     */
54
    public function testContentTypeToSuffix()
55
    {
56
        $this->assertEquals('text/csv',
57
            \FlexiPeeHP\Formats::suffixToContentType('csv'));
58
    }
59
}
60