@@ 43-55 (lines=13) @@ | ||
40 | * |
|
41 | * @covers ::execute |
|
42 | */ |
|
43 | public function testExecute() |
|
44 | { |
|
45 | $tester = new CommandTester($this->command); |
|
46 | $tester->execute( |
|
47 | [ |
|
48 | 'command' => $this->command->getName(), |
|
49 | 'email' => '[email protected]', |
|
50 | 'password' => 'newpassword' |
|
51 | ] |
|
52 | ); |
|
53 | ||
54 | $this->assertContains('Password updated', $tester->getDisplay()); |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * Test that if an email does not match a Member, then an error is returned |
|
@@ 62-74 (lines=13) @@ | ||
59 | * |
|
60 | * @covers ::execute |
|
61 | */ |
|
62 | public function testErrorWhenEmailNotFound() |
|
63 | { |
|
64 | $tester = new CommandTester($this->command); |
|
65 | $tester->execute( |
|
66 | [ |
|
67 | 'command' => $this->command->getName(), |
|
68 | 'email' => '[email protected]', |
|
69 | 'password' => 'helloworld' |
|
70 | ] |
|
71 | ); |
|
72 | ||
73 | $this->assertContains('Member with email "[email protected]" was not found', $tester->getDisplay()); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * Ensure that the InputArgument for at least one of the arguments has been added |