PixelResponseTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A responseHasGifTypeAndIsNotEmpty() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ShlinkioTest\Shlink\Common\Response;
6
7
use PHPUnit\Framework\TestCase;
8
use Shlinkio\Shlink\Common\Response\PixelResponse;
9
10
class PixelResponseTest extends TestCase
11
{
12
    private PixelResponse $resp;
13
14
    public function setUp(): void
15
    {
16
        $this->resp = new PixelResponse();
17
    }
18
19
    /** @test */
20
    public function responseHasGifTypeAndIsNotEmpty(): void
21
    {
22
        $this->assertEquals('image/gif', $this->resp->getHeaderLine('Content-Type'));
23
        $this->assertNotEmpty((string) $this->resp->getBody());
24
    }
25
}
26