Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
32 | public function testCreateUserGetsHandled() |
||
33 | { |
||
34 | $handler = new CreateUserHandler($this->userRepositoryCollection); |
||
35 | |||
36 | $user = new CreateUser('sumo', 'randomPassword', 'sumocoders', '[email protected]'); |
||
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 | $this->assertEquals( |
||
53 | '[email protected]', |
||
54 | $this->userRepository->findByUsername('sumo')->getEmail() |
||
55 | ); |
||
56 | } |
||
57 | } |
||
58 |
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..