can_use_native_web_test_case_assertions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
namespace Zenstruck\Browser\Tests;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
/**
8
 * @author Kevin Bond <[email protected]>
9
 */
10
final class KernelBrowserWebTestCaseTest extends WebTestCase
11
{
12
    use KernelBrowserTests;
0 ignored issues
show
introduced by
The trait Zenstruck\Browser\Tests\KernelBrowserTests requires some properties which are not provided by Zenstruck\Browser\Tests\...lBrowserWebTestCaseTest: $preActionsCalled, $preAssertionsCalled
Loading history...
13
14
    /**
15
     * @test
16
     */
17
    public function calling_browser_ensures_kernel_is_shutdown(): void
18
    {
19
        static::bootKernel();
20
21
        $this->browser()
22
            ->visit('/page1')
23
            ->assertSuccessful()
24
        ;
25
    }
26
27
    /**
28
     * @test
29
     */
30
    public function can_use_native_web_test_case_assertions(): void
31
    {
32
        $this->browser()
33
            ->visit('/invalid-page')
34
            ->assertStatus(404)
35
        ;
36
37
        self::assertResponseStatusCodeSame(404);
38
    }
39
}
40