| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testCreateUser_() |
||
| 19 | { |
||
| 20 | $task = App::make(CreateUserAction::class); |
||
| 21 | |||
| 22 | $email = '[email protected]'; |
||
| 23 | $name = 'Mahmoud'; |
||
| 24 | $password = 'so-secret'; |
||
| 25 | |||
| 26 | $user = $task->run($email, $password, $name, null, null, true); |
||
| 27 | |||
| 28 | // asset the returned object is an instance of the User |
||
| 29 | $this->assertInstanceOf(User::class, $user); |
||
| 30 | |||
| 31 | // assert the user has logged in and has a token attached to it |
||
| 32 | $this->assertNotEmpty($user->token); |
||
| 33 | |||
| 34 | $this->assertEquals($user->name, $name); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |