IssueClientResponseTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 27
rs 10
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 array $body;
14
15
    private ?string $nextUrl = null;
16
17
    private IssueClientResponse $issueClientResponse;
18
19
    public function testGetBody(): void
20
    {
21
        self::assertSame($this->body, $this->issueClientResponse->getBody());
22
    }
23
24
    public function testGetNextUrl(): void
25
    {
26
        self::assertSame($this->nextUrl, $this->issueClientResponse->getNextUrl());
27
    }
28
29
    protected function setUp(): void
30
    {
31
        $this->body    = ['body' => true];
32
        $this->nextUrl = 'https://www.google.com';
33
34
        $this->issueClientResponse = new IssueClientResponse(
35
            $this->body,
36
            $this->nextUrl
37
        );
38
    }
39
}
40