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