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

IssueTest   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetUser() 0 3 1
A testNumber() 0 3 1
A testGetLabels() 0 3 1
A testGetTitle() 0 3 1
A testGetUrl() 0 3 1
A testRender() 0 3 1
A setUp() 0 8 1
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