| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function userLogin(ApiTester $I, CreateUserCest $createUserCest) |
||
| 42 | { |
||
| 43 | $createUserCest->createUser($I); |
||
| 44 | $I->haveHttpHeader('content-type', 'application/json'); |
||
| 45 | $I->sendPOST('/login', [ |
||
| 46 | 'username' => 'demo', |
||
| 47 | 'password' => 'pass123', |
||
| 48 | ]); |
||
| 49 | $I->seeResponseCodeIs(HttpCode::OK); // 200 |
||
| 50 | $I->seeResponseIsJson(); |
||
| 51 | $I->seeResponseContainsJson(['code' => 0]); |
||
| 52 | $I->seeResponseJsonMatchesXpath('//data/token'); |
||
| 53 | $I->seeResponseJsonMatchesXpath('//data/user/username'); |
||
| 54 | } |
||
| 56 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.