Completed
Push — master ( 16b7b3...90dfdb )
by Ryan
13:15
created

IdTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 22
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testId() 0 9 1
A testIdAtom10() 0 9 1
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\Integration\Atom\Feed;
12
13
use SimplePie\Enum\Serialization;
14
use SimplePie\Test\Integration\AbstractTestCase;
15
use SimplePie\Type\Node;
16
use Skyzyx\UtilityPack\Types;
17
18
/**
19
 * @coversNothing
20
 */
21
class IdTest extends AbstractTestCase
22
{
23
    public function testId(): void
24
    {
25
        $id = $this->feed->getId();
26
27
        $this->assertEquals(Node::class, Types::getClassOrType($id));
28
        $this->assertEquals('tag:github.com,2008:https://github.com/skyzyx/signer/releases', (string) $id);
29
        $this->assertEquals('tag:github.com,2008:https://github.com/skyzyx/signer/releases', $id->getValue());
30
        $this->assertEquals(Serialization::TEXT, $id->getSerialization());
31
    }
32
33
    public function testIdAtom10(): void
34
    {
35
        $id = $this->feed->getId('atom10');
36
37
        $this->assertEquals(Node::class, Types::getClassOrType($id));
38
        $this->assertEquals('tag:github.com,2008:https://github.com/skyzyx/signer/releases', (string) $id);
39
        $this->assertEquals('tag:github.com,2008:https://github.com/skyzyx/signer/releases', $id->getValue());
40
        $this->assertEquals(Serialization::TEXT, $id->getSerialization());
41
    }
42
}
43