| @@ 195-212 (lines=18) @@ | ||
| 192 | * @depends test_authRegister |
|
| 193 | * Testing for the login with invalid or wrong email |
|
| 194 | */ |
|
| 195 | public function test_authLoginWrongEmail() |
|
| 196 | { |
|
| 197 | $output = $this->obLogin->authLogin( |
|
| 198 | [ |
|
| 199 | "login" => '[email protected]', |
|
| 200 | "passLogin" => 'egfb' |
|
| 201 | ] |
|
| 202 | ); |
|
| 203 | $output = (array)json_decode($output, True); |
|
| 204 | $expectedOutput = [ |
|
| 205 | [ |
|
| 206 | "key" => "login", |
|
| 207 | "value" => " *Enter correct Email address" |
|
| 208 | ] |
|
| 209 | ]; |
|
| 210 | ||
| 211 | $this->assertEquals($expectedOutput, $output); |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * @depends test_authRegister |
|
| @@ 218-235 (lines=18) @@ | ||
| 215 | * @depends test_authRegister |
|
| 216 | * Testing for the login with invalid email credentials |
|
| 217 | */ |
|
| 218 | public function test_authLoginInvalidUsernameEmail() |
|
| 219 | { |
|
| 220 | $output = $this->obLogin->authLogin( |
|
| 221 | [ |
|
| 222 | "login" => 'invalid', |
|
| 223 | "passLogin" => 'invalid' |
|
| 224 | ] |
|
| 225 | ); |
|
| 226 | $output = (array)json_decode($output, True); |
|
| 227 | $expectedOutput = [ |
|
| 228 | [ |
|
| 229 | "key" => "login", |
|
| 230 | "value" => " *Invalid username or email" |
|
| 231 | ] |
|
| 232 | ]; |
|
| 233 | ||
| 234 | $this->assertEquals($expectedOutput, $output); |
|
| 235 | } |
|
| 236 | ||
| 237 | /** |
|
| 238 | * @depends test_authRegister |
|
| @@ 241-257 (lines=17) @@ | ||
| 238 | * @depends test_authRegister |
|
| 239 | * Testing for the login with invalid password credentials |
|
| 240 | */ |
|
| 241 | public function test_authLoginInvalidPassword() |
|
| 242 | { |
|
| 243 | $output = $this->obLogin->authLogin( |
|
| 244 | [ |
|
| 245 | "login" => 'test', |
|
| 246 | "passLogin" => 'invalid' |
|
| 247 | ] |
|
| 248 | ); |
|
| 249 | $output = (array)json_decode($output, True); |
|
| 250 | $expectedOutput = [ |
|
| 251 | [ |
|
| 252 | "key" => "passLogin", |
|
| 253 | "value" => " *Invalid password" |
|
| 254 | ] |
|
| 255 | ]; |
|
| 256 | $this->assertEquals($expectedOutput, $output); |
|
| 257 | } |
|
| 258 | ||
| 259 | /** |
|
| 260 | * @depends test_authRegister |
|