Passed
Push — master ( bf1af5...e52ce1 )
by Ryan
14:07
created

FeedTypeTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 32
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright (c) 2017 Ryan Parman <http://ryanparman.com>.
4
 * Copyright (c) 2017 Contributors.
5
 *
6
 * http://opensource.org/licenses/Apache2.0
7
 */
8
9
declare(strict_types=1);
10
11
namespace SimplePie\Test\Unit\Enum;
12
13
use SimplePie\Enum\FeedType;
14
use SimplePie\Test\Unit\AbstractTestCase;
15
16
/**
17
 * @coversNothing
18
 */
19
class FeedTypeTest extends AbstractTestCase
20
{
21
    public function testIntrospect(): void
22
    {
23
        $this->assertSame(FeedType::introspect(), [
24
            'ALL'  => 'all',
25
            'JSON' => 'json',
26
            'HTML' => 'html',
27
            'XML'  => 'xml',
28
        ]);
29
    }
30
31
    public function testIntrospectKeys(): void
32
    {
33
        $this->assertSame(FeedType::introspectKeys(), [
34
            'ALL',
35
            'JSON',
36
            'HTML',
37
            'XML',
38
        ]);
39
    }
40
41
    public function testHasValue(): void
42
    {
43
        $this->assertTrue(FeedType::hasValue(FeedType::ALL));
44
        $this->assertTrue(FeedType::hasValue(FeedType::JSON));
45
        $this->assertTrue(FeedType::hasValue(FeedType::HTML));
46
        $this->assertTrue(FeedType::hasValue(FeedType::XML));
47
48
        $this->assertFalse(FeedType::hasValue('nope'));
49
    }
50
}
51