ResponseFactoryTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 2
b 0
f 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testCreate() 0 6 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
use Opulence\Http\Responses\ResponseHeaders;
10
11
class ResponseFactoryTest extends TestCase
12
{
13
    /** @var ResponseFactory - System Under Test */
14
    protected $sut;
15
16
    public function setUp(): void
17
    {
18
        parent::setUp();
19
20
        $this->sut = new ResponseFactory();
21
    }
22
23
    public function testCreate()
24
    {
25
        $response = $this->sut->create();
26
27
        $this->assertInstanceOf(Response::class, $response);
28
        $this->assertSame(ResponseHeaders::HTTP_INTERNAL_SERVER_ERROR, $response->getStatusCode());
29
    }
30
}
31