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

IssueClientResponseTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A testGetBody() 0 3 1
A testGetNextUrl() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ChangelogGenerator\Tests;
6
7
use ChangelogGenerator\IssueClientResponse;
8
use PHPUnit\Framework\TestCase;
9
10
final class IssueClientResponseTest extends TestCase
11
{
12
    /** @var mixed[] */
13
    private $body;
14
15
    /** @var string|null */
16
    private $nextUrl;
17
18
    /** @var IssueClientResponse */
19
    private $issueClientResponse;
20
21
    public function testGetBody() : void
22
    {
23
        self::assertEquals($this->body, $this->issueClientResponse->getBody());
24
    }
25
26
    public function testGetNextUrl() : void
27
    {
28
        self::assertEquals($this->nextUrl, $this->issueClientResponse->getNextUrl());
29
    }
30
31
    protected function setUp() : void
32
    {
33
        $this->body    = ['body' => true];
34
        $this->nextUrl = 'https://www.google.com';
35
36
        $this->issueClientResponse = new IssueClientResponse(
37
            $this->body,
38
            $this->nextUrl
39
        );
40
    }
41
}
42