2019-10-07 22:02:28 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Test\Unit\Http\Exceptions;
|
|
|
|
|
|
|
|
use Engelsystem\Http\Exceptions\HttpNotFound;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class HttpNotFoundTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Http\Exceptions\HttpNotFound::__construct
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testConstruct(): void
|
2019-10-07 22:02:28 +02:00
|
|
|
{
|
|
|
|
$exception = new HttpNotFound();
|
|
|
|
$this->assertEquals(404, $exception->getStatusCode());
|
|
|
|
$this->assertEquals('', $exception->getMessage());
|
|
|
|
|
|
|
|
$exception = new HttpNotFound('Nothing to see here!');
|
|
|
|
$this->assertEquals('Nothing to see here!', $exception->getMessage());
|
|
|
|
}
|
|
|
|
}
|