Passed
Push — master ( 1cf0a9...56b73d )
by Ayan
01:37
created

OkTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
<?php namespace Phprest\Response;
2
3
use Phprest\HttpFoundation\Response;
4
use PHPUnit\Framework\TestCase;
5
6
class OkTest extends TestCase
7
{
8
    public function testInstantiation(): void
9
    {
10
        $response = new Ok('test content', ['Content-Type' => 'application/json']);
11
12
        $this->assertEquals(200, $response->getStatusCode());
13
        $this->assertEquals('test content', $response->getContent());
14
        $this->assertEquals('application/json', $response->headers->get('content-type'));
15
    }
16
}
17