Test Failed
Branch improve-scrutinizer (33a448)
by Ayan
02:51
created

CreatedTest::testInstantiation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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