KernelBrowserWebTestCaseTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 10
dl 0
loc 28
rs 10
c 3
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A can_use_native_web_test_case_assertions() 0 8 1
A calling_browser_ensures_kernel_is_shutdown() 0 7 1
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