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