2018-11-14 02:17:27 +01:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-11-14 02:17:27 +01:00
|
|
|
namespace Engelsystem\Test\Unit\Http\Exceptions;
|
|
|
|
|
|
|
|
use Engelsystem\Http\Exceptions\HttpForbidden;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class HttpForbiddenTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Http\Exceptions\HttpForbidden::__construct
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testConstruct(): void
|
2018-11-14 02:17:27 +01:00
|
|
|
{
|
|
|
|
$exception = new HttpForbidden();
|
|
|
|
$this->assertEquals(403, $exception->getStatusCode());
|
|
|
|
$this->assertEquals('', $exception->getMessage());
|
|
|
|
|
|
|
|
$exception = new HttpForbidden('Go away!');
|
|
|
|
$this->assertEquals('Go away!', $exception->getMessage());
|
|
|
|
}
|
|
|
|
}
|