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

TitleTest::testTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0
rs 9.6666
cc 1
eloc 6
nc 1
nop 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\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 TitleTest extends AbstractTestCase
22
{
23
    public function testTitle(): void
24
    {
25
        $title = $this->feed->getTitle();
26
27
        $this->assertEquals(Node::class, Types::getClassOrType($title));
28
        $this->assertEquals('Release notes from signer', (string) $title);
29
        $this->assertEquals('Release notes from signer', $title->getValue());
30
        $this->assertEquals(Serialization::TEXT, $title->getSerialization());
31
    }
32
33
    public function testTitleAtom10(): void
34
    {
35
        $title = $this->feed->getTitle('atom10');
36
37
        $this->assertEquals(Node::class, Types::getClassOrType($title));
38
        $this->assertEquals('Release notes from signer', (string) $title);
39
        $this->assertEquals('Release notes from signer', $title->getValue());
40
        $this->assertEquals(Serialization::TEXT, $title->getSerialization());
41
    }
42
}
43