summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/HttpAuthExpiredTest.php
blob: 4eaee0323355692feb03d342cdda7d4f01008fa1 (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\HttpAuthExpired;
use PHPUnit\Framework\TestCase;

class HttpAuthExpiredTest extends TestCase
{
    /**
     * @covers \Engelsystem\Http\Exceptions\HttpAuthExpired::__construct
     */
    public function testConstruct()
    {
        $exception = new HttpAuthExpired();
        $this->assertEquals(419, $exception->getStatusCode());
        $this->assertEquals('Authentication Expired', $exception->getMessage());

        $exception = new HttpAuthExpired('Oops!');
        $this->assertEquals('Oops!', $exception->getMessage());
    }
}