2018-11-17 20:40:47 +03:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace ShlinkioTest\Shlink\Common\Response;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Shlinkio\Shlink\Common\Response\PixelResponse;
|
|
|
|
|
|
|
|
class PixelResponseTest extends TestCase
|
|
|
|
{
|
2018-11-20 21:30:27 +03:00
|
|
|
/** @var PixelResponse */
|
2018-11-17 20:40:47 +03:00
|
|
|
private $resp;
|
|
|
|
|
2019-02-16 12:53:45 +03:00
|
|
|
public function setUp(): void
|
2018-11-17 20:40:47 +03:00
|
|
|
{
|
|
|
|
$this->resp = new PixelResponse();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function responseHasGifTypeAndIsNotEmpty()
|
|
|
|
{
|
|
|
|
$this->assertEquals('image/gif', $this->resp->getHeaderLine('Content-Type'));
|
|
|
|
$this->assertNotEmpty((string) $this->resp->getBody());
|
|
|
|
}
|
|
|
|
}
|