ResponseConverterTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFromPsr() 0 8 1
A setUp() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Admin\Psr7;
6
7
use Nyholm\Psr7\Response;
8
use PHPUnit\Framework\TestCase;
9
10
class ResponseConverterTest extends TestCase
11
{
12
    /** @var ResponseConverter - System Under Test */
13
    protected $sut;
14
15
    public function setUp(): void
16
    {
17
        parent::setUp();
18
19
        $this->sut = new ResponseConverter();
20
    }
21
22
    public function testFromPsr()
23
    {
24
        $psrResponse = new Response();
25
26
        $opulenceResponse = $this->sut->fromPsr($psrResponse);
27
28
        $this->assertInstanceOf(\Opulence\Http\Responses\Response::class, $opulenceResponse);
29
        $this->assertSame($psrResponse->getStatusCode(), $opulenceResponse->getStatusCode());
30
    }
31
}
32