| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testWebUserLogout() |
||
| 18 | { |
||
| 19 | // go to the page |
||
| 20 | $this->visit('login') |
||
| 21 | ->see('Login'); |
||
| 22 | |||
| 23 | // fill the login form |
||
| 24 | $this->type('[email protected]', 'email') |
||
| 25 | ->type('admin', 'password') |
||
| 26 | ->press('login'); |
||
| 27 | |||
| 28 | // login success and redirect to welcome view |
||
| 29 | $this->seePageIs('/dashboard') |
||
| 30 | ->see('Hello Admin'); |
||
| 31 | |||
| 32 | // trigger the logout request |
||
| 33 | $response = $this->post($this->endpoint); |
||
| 34 | |||
| 35 | $response->assertResponseStatus(302); |
||
| 36 | $this->assertRedirectedTo('login'); |
||
| 37 | $this->see('login'); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |