Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
73 | public function logoutWithBadToken(AcceptanceTester $I): void |
||
74 | { |
||
75 | $I->haveHttpHeader( |
||
76 | 'X-Api-Key', |
||
77 | 'bad-token' |
||
78 | ); |
||
79 | |||
80 | $I->haveHttpHeader( |
||
81 | 'Accept', |
||
82 | 'application/json' |
||
83 | ); |
||
84 | |||
85 | $I->sendPOST( |
||
86 | '/logout/' |
||
87 | ); |
||
88 | |||
89 | $I->seeResponseCodeIs(HttpCode::UNAUTHORIZED); |
||
90 | $I->seeResponseIsJson(); |
||
91 | $I->seeResponseContainsJson( |
||
92 | [ |
||
93 | 'status' => 'failed', |
||
94 | 'error_message' => 'Unauthorised request', |
||
95 | 'error_code' => HttpCode::UNAUTHORIZED, |
||
96 | 'data' => null, |
||
97 | ] |
||
101 |