@@ 41-48 (lines=8) @@ | ||
38 | $this->makeApiRequest('SessionRoute/me', ['token' => $session['token'], 'method' => 'DELETE']); |
|
39 | } |
|
40 | ||
41 | public function testTryDeleteSessionWithoutID() { |
|
42 | $session = $this->createSession(); |
|
43 | $result = $this->makeApiRequest('SessionRoute', ['token' => $session['token'], 'method' => 'DELETE', 'code' => 400]); |
|
44 | ||
45 | $this->assertTrue(array_key_exists('code', $result)); |
|
46 | $this->assertTrue(array_key_exists('message', $result)); |
|
47 | $this->assertEquals(404, $result['code']); |
|
48 | } |
|
49 | ||
50 | public function testTryDeleteSessionWithWrongId() { |
|
51 | $session = $this->createSession(); |
|
@@ 50-57 (lines=8) @@ | ||
47 | $this->assertEquals(404, $result['code']); |
|
48 | } |
|
49 | ||
50 | public function testTryDeleteSessionWithWrongId() { |
|
51 | $session = $this->createSession(); |
|
52 | $result = $this->makeApiRequest('SessionRoute/-2', ['token' => $session['token'], 'method' => 'DELETE', 'code' => 400]); |
|
53 | ||
54 | $this->assertTrue(array_key_exists('code', $result)); |
|
55 | $this->assertTrue(array_key_exists('message', $result)); |
|
56 | $this->assertEquals(404, $result['code']); |
|
57 | } |
|
58 | ||
59 | public function testCreateSession() { |
|
60 | $session = $this->createSession(); |