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