summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/HttpForbiddenTest.php
blob: 765a20d26bb734ca0174471ca9ed65cd488345b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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()
    {
        $exception = new HttpForbidden();
        $this->assertEquals(403, $exception->getStatusCode());
        $this->assertEquals('', $exception->getMessage());

        $exception = new HttpForbidden('Go away!');
        $this->assertEquals('Go away!', $exception->getMessage());
    }
}