| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function testLogout() |
||
| 36 | { |
||
| 37 | // login as the demo user |
||
| 38 | Yii::$app->request->bodyParams = [ |
||
| 39 | 'LoginForm' => [ |
||
| 40 | 'email' => '[email protected]', |
||
| 41 | 'password' => 'password', |
||
| 42 | ], |
||
| 43 | ]; |
||
| 44 | $this->runAction(LoginAction::class, 'login'); |
||
| 45 | $this->assertFalse(Yii::$app->user->isGuest); |
||
| 46 | |||
| 47 | // logout |
||
| 48 | $this->runAction(LogoutAction::class, 'logout'); |
||
| 49 | $this->assertTrue(Yii::$app->user->isGuest); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |