mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-28 17:08:58 +03:00
23 lines
579 B
PHP
23 lines
579 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace ShlinkioTest\Shlink\Common\Response;
|
|
|
|
use Endroid\QrCode\QrCode;
|
|
use PHPUnit\Framework\TestCase;
|
|
use Shlinkio\Shlink\Common\Response\QrCodeResponse;
|
|
|
|
class QrCodeResponseTest extends TestCase
|
|
{
|
|
/**
|
|
* @test
|
|
*/
|
|
public function providedQrCoideIsSetAsBody()
|
|
{
|
|
$qrCode = new QrCode('Hello');
|
|
$resp = new QrCodeResponse($qrCode);
|
|
|
|
$this->assertEquals($qrCode->getContentType(), $resp->getHeaderLine('Content-Type'));
|
|
$this->assertEquals($qrCode->get(), (string) $resp->getBody());
|
|
}
|
|
}
|