| @@ 57-77 (lines=21) @@ | ||
| 54 | * @depends test_authRegister |
|
| 55 | * Testing for the register with empty username |
|
| 56 | */ |
|
| 57 | public function test_authregisterEmptyUsername() |
|
| 58 | { |
|
| 59 | $output = $this->obRegister->authregister( |
|
| 60 | [ |
|
| 61 | "name" => 'Test', |
|
| 62 | "email" => '[email protected]', |
|
| 63 | "username" => '', |
|
| 64 | "mob" => '1234567890', |
|
| 65 | "passRegister" => 'testing' |
|
| 66 | ] |
|
| 67 | ); |
|
| 68 | $output = (array)json_decode($output, True); |
|
| 69 | $expectedOutput = [ |
|
| 70 | [ |
|
| 71 | "key" => "username", |
|
| 72 | "value" => " *Enter the username" |
|
| 73 | ] |
|
| 74 | ]; |
|
| 75 | ||
| 76 | $this->assertEquals($expectedOutput, $output); |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * @depends test_authRegister |
|
| @@ 83-103 (lines=21) @@ | ||
| 80 | * @depends test_authRegister |
|
| 81 | * Testing for the register with invalid email credentials |
|
| 82 | */ |
|
| 83 | public function test_authregisterInvalidEmail() |
|
| 84 | { |
|
| 85 | $output = $this->obRegister->authregister( |
|
| 86 | [ |
|
| 87 | "name" => 'Test', |
|
| 88 | "email" => '[email protected]', |
|
| 89 | "username" => 'abc', |
|
| 90 | "mob" => '1234567890', |
|
| 91 | "passRegister" => 'testing' |
|
| 92 | ] |
|
| 93 | ); |
|
| 94 | $output = (array)json_decode($output, True); |
|
| 95 | $expectedOutput = [ |
|
| 96 | [ |
|
| 97 | "key" => "email", |
|
| 98 | "value" => " *Enter correct Email address" |
|
| 99 | ] |
|
| 100 | ]; |
|
| 101 | ||
| 102 | $this->assertEquals($expectedOutput, $output); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * @depends test_authRegister |
|