| Total Complexity | 7 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 13 | trait KernelBrowserTests |
||
| 14 | { |
||
| 15 | use BrowserKitBrowserTests, HasKernelBrowser; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @test |
||
| 19 | */ |
||
| 20 | public function can_act_as_user(): void |
||
| 21 | { |
||
| 22 | if (!\method_exists(SymfonyKernelBrowser::class, 'loginUser')) { |
||
| 23 | $this->markTestSkipped(SymfonyKernelBrowser::class.'::loginUser() is only available in Symfony 5.1+.'); |
||
|
|
|||
| 24 | } |
||
| 25 | |||
| 26 | $this->browser() |
||
| 27 | ->throwExceptions() |
||
| 28 | ->actingAs(new User('kevin', 'pass')) |
||
| 29 | ->visit('/user') |
||
| 30 | ->assertSee('user: kevin/pass') |
||
| 31 | ; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @test |
||
| 36 | */ |
||
| 37 | public function can_enable_exception_throwing(): void |
||
| 45 | ; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @test |
||
| 50 | */ |
||
| 51 | public function can_re_enable_catching_exceptions(): void |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @test |
||
| 72 | */ |
||
| 73 | public function can_enable_the_profiler(): void |
||
| 82 | } |
||
| 83 | |||
| 84 | protected static function browserClass(): string |
||
| 87 | } |
||
| 88 | } |
||
| 89 |