| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 32 | public function testCreateUserGetsHandled() |
||
| 33 | { |
||
| 34 | $handler = new CreateUserHandler($this->userRepositoryCollection); |
||
| 35 | |||
| 36 | $user = new CreateUser('sumo', 'randomPassword', 'sumocoders'); |
||
| 37 | |||
| 38 | $handler->handle($user, User::class); |
||
| 39 | |||
| 40 | $this->assertEquals( |
||
| 41 | 'sumo', |
||
| 42 | $this->userRepository->findByUsername('sumo')->getUsername() |
||
| 43 | ); |
||
| 44 | $this->assertEquals( |
||
| 45 | 'sumocoders', |
||
| 46 | $this->userRepository->findByUsername('sumo')->getDisplayName() |
||
| 47 | ); |
||
| 48 | $this->assertEquals( |
||
| 49 | 'randomPassword', |
||
| 50 | $this->userRepository->findByUsername('sumo')->getPassword() |
||
| 51 | ); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..