summaryrefslogtreecommitdiff
path: root/tests/Unit/Http/Exceptions/HttpPermanentRedirectTest.php
blob: 3f6a832c3a4b419248bd6160adc48b7a9aad8e17 (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\HttpPermanentRedirect;
use Engelsystem\Http\Exceptions\HttpRedirect;
use PHPUnit\Framework\TestCase;

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