NotFoundTest::not_found_created()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Zenstruck\RedirectBundle\Tests\Functional;
4
5
/**
6
 * @author Kevin Bond <[email protected]>
7
 */
8
class NotFoundTest extends FunctionalTest
9
{
10
    /**
11
     * @test
12
     */
13
    public function not_found_created()
14
    {
15
        $this->assertCount(0, $this->getNotFounds());
16
17
        $this->client->request('GET', '/not-found?foo=bar');
18
19
        $notFounds = $this->getNotFounds();
20
21
        $this->assertCount(1, $notFounds);
22
        $this->assertSame('/not-found', $notFounds[0]->getPath());
23
        $this->assertSame('http://localhost/not-found?foo=bar', $notFounds[0]->getFullUrl());
24
        $this->assertNull($notFounds[0]->getReferer());
25
    }
26
}
27