Completed
Push — master ( aaccd5...c6e65b )
by Jonathan
10s
created

IssueTest::testGetUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ChangelogGenerator\Tests;
6
7
use ChangelogGenerator\Issue;
8
use PHPUnit\Framework\TestCase;
9
10
final class IssueTest extends TestCase
11
{
12
    /** @var Issue */
13
    private $issue;
14
15
    public function testNumber() : void
16
    {
17
        self::assertEquals(1, $this->issue->getNumber());
18
    }
19
20
    public function testGetTitle() : void
21
    {
22
        self::assertEquals('Test', $this->issue->getTitle());
23
    }
24
25
    public function testGetUrl() : void
26
    {
27
        self::assertEquals('https://www.google.com', $this->issue->getUrl());
28
    }
29
30
    public function testGetUser() : void
31
    {
32
        self::assertEquals('jwage', $this->issue->getUser());
33
    }
34
35
    public function testGetLabels() : void
36
    {
37
        self::assertEquals(['Enhancement'], $this->issue->getLabels());
38
    }
39
40
    public function testRender() : void
41
    {
42
        self::assertEquals(' - [1: Test](https://www.google.com) thanks to @jwage', $this->issue->render());
43
    }
44
45
    protected function setUp() : void
46
    {
47
        $this->issue = new Issue(
48
            1,
49
            'Test',
50
            'https://www.google.com',
51
            'jwage',
52
            ['Enhancement']
53
        );
54
    }
55
}
56