engelsystem/tests/Unit/Http/Exceptions/HttpForbiddenTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
607 B
PHP
Raw Normal View History

2018-11-14 02:17:27 +01:00
<?php
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
*/
public function testConstruct(): void
{
$exception = new HttpForbidden();
$this->assertEquals(403, $exception->getStatusCode());
$this->assertEquals('', $exception->getMessage());
$exception = new HttpForbidden('Go away!');
$this->assertEquals('Go away!', $exception->getMessage());
}
}