summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/HttpTemporaryRedirectTest.php
blob: 6096830f1bb6f2472edaa129ec809613c8805785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace Engelsystem\Test\Unit\Http;

use Engelsystem\Http\Exceptions\HttpRedirect;
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
use PHPUnit\Framework\TestCase;

class HttpTemporaryRedirectTest extends TestCase
{
    /**
     * @covers \Engelsystem\Http\Exceptions\HttpTemporaryRedirect::__construct
     */
    public function testConstruct()
    {
        $exception = new HttpTemporaryRedirect('https://lorem.ipsum/foo/bar');
        $this->assertInstanceOf(HttpRedirect::class, $exception);
        $this->assertEquals(302, $exception->getStatusCode());
    }
}