1 | <?php |
||
20 | final class RegistrationContext implements Context |
||
21 | { |
||
22 | /** @var AbstractBrowser */ |
||
23 | private $client; |
||
24 | |||
25 | private $content = []; |
||
26 | |||
27 | public function __construct(AbstractBrowser $client) |
||
31 | |||
32 | /** |
||
33 | * @When I want to register a new account |
||
34 | * @When I want to again register a new account |
||
35 | */ |
||
36 | public function iWantToRegisterNewAccount(): void |
||
45 | |||
46 | /** |
||
47 | * @When I specify the first name as :firstName |
||
48 | * @When I do not specify the first name |
||
49 | */ |
||
50 | public function iSpecifyTheFirstNameAs(string $firstName = ''): void |
||
54 | |||
55 | /** |
||
56 | * @When I specify the last name as :lastName |
||
57 | * @When I do not specify the last name |
||
58 | */ |
||
59 | public function iSpecifyTheLastNameAs(string $lastName = ''): void |
||
63 | |||
64 | /** |
||
65 | * @When I specify the email as :email |
||
66 | * @When I do not specify the email |
||
67 | */ |
||
68 | public function iSpecifyTheEmailAs(string $email = ''): void |
||
72 | |||
73 | /** |
||
74 | * @When I specify the password as :password |
||
75 | * @When I do not specify the password |
||
76 | */ |
||
77 | public function iSpecifyThePasswordAs(string $password = ''): void |
||
81 | |||
82 | /** |
||
83 | * @When I specify the phone number as :phoneNumber |
||
84 | */ |
||
85 | public function iSpecifyThePhoneNumberAs(string $phoneNumber): void |
||
89 | |||
90 | /** |
||
91 | * @When I confirm this password |
||
92 | */ |
||
93 | public function iConfirmThisPassword(): void |
||
97 | |||
98 | /** |
||
99 | * @When I register this account |
||
100 | * @When I try to register this account |
||
101 | */ |
||
102 | public function iRegisterThisAccount(): void |
||
114 | |||
115 | /** |
||
116 | * @Then I should be notified that new account has been successfully created |
||
117 | */ |
||
118 | public function iShouldBeNotifiedThatNewAccountHasBeenSuccessfullyCreated(): void |
||
122 | |||
123 | /** |
||
124 | * @Then I should be notified that the first name is required |
||
125 | */ |
||
126 | public function iShouldBeNotifiedThatTheFirstNameIsRequired(): void |
||
130 | |||
131 | /** |
||
132 | * @Then I should be notified that the last name is required |
||
133 | */ |
||
134 | public function iShouldBeNotifiedThatTheLastNameIsRequired(): void |
||
138 | |||
139 | /** |
||
140 | * @Then I should be notified that the password is required |
||
141 | */ |
||
142 | public function iShouldBeNotifiedThatThePasswordIsRequired(): void |
||
146 | |||
147 | /** |
||
148 | * @Then I should be notified that the email is required |
||
149 | */ |
||
150 | public function iShouldBeNotifiedThatTheEmailIsRequired(): void |
||
154 | |||
155 | /** |
||
156 | * @Then I should be notified that the email is already used |
||
157 | */ |
||
158 | public function iShouldBeNotifiedThatTheEmailIsAlreadyUsed(): void |
||
162 | |||
163 | /** |
||
164 | * @Then I should not be logged in |
||
165 | */ |
||
166 | public function iShouldNotBeLoggedIn(): void |
||
170 | |||
171 | /** |
||
172 | * @Then I should be logged in |
||
173 | */ |
||
174 | public function iShouldBeLoggedIn(): void |
||
178 | |||
179 | private function assertFieldValidationMessage(string $path, string $message): void |
||
189 | } |
||
190 |