| @@ 34-51 (lines=18) @@ | ||
| 31 | } |
|
| 32 | ||
| 33 | ||
| 34 | public function test_authRegister() |
|
| 35 | { |
|
| 36 | ||
| 37 | $output = $this->obRegister->authRegister( |
|
| 38 | [ |
|
| 39 | "name" => 'Test', |
|
| 40 | "email" => '[email protected]', |
|
| 41 | "username" => 'test', |
|
| 42 | "mob" => '1234567890', |
|
| 43 | "passRegister" => 'testing' |
|
| 44 | ] |
|
| 45 | ); |
|
| 46 | $output = (array)json_decode($output); |
|
| 47 | $this->assertEquals([ |
|
| 48 | 'location' => 'http://127.0.0.1/openchat/views/account.php' |
|
| 49 | ], $output); |
|
| 50 | ||
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * @depends test_authRegister |
|
| @@ 54-73 (lines=20) @@ | ||
| 51 | * @depends testAuthRegister |
|
| 52 | * Register User2 |
|
| 53 | */ |
|
| 54 | public function testAuthRegister2() |
|
| 55 | { |
|
| 56 | $output = $this->obRegister->authRegister( |
|
| 57 | [ |
|
| 58 | "name" => 'Test2', |
|
| 59 | "email" => '[email protected]', |
|
| 60 | "username" => 'test2', |
|
| 61 | "mob" => '1234567890', |
|
| 62 | "passRegister" => 'testing' |
|
| 63 | ] |
|
| 64 | ); |
|
| 65 | ||
| 66 | $output = (array)json_decode($output); |
|
| 67 | $this->assertEquals([ |
|
| 68 | 'location' => 'http://127.0.0.1/openchat/views/account.php' |
|
| 69 | ], $output); |
|
| 70 | ||
| 71 | $userId = Session::get('start'); |
|
| 72 | return $userId; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @depends testAuthRegister2 |
|