| 1 | <?php |
||
| 5 | use Codeception\Util\HttpCode; |
||
| 6 | |||
| 7 | class GetUserCest |
||
| 8 | { |
||
| 9 | public function getUser(ApiTester $I) |
||
| 24 | |||
| 25 | public function getNonExistingUser(ApiTester $I) |
||
| 26 | { |
||
| 27 | $I->wantTo('get non-existing user'); |
||
| 28 | $I->haveHttpHeader('Content-Type', 'application/json'); |
||
| 29 | $I->sendGET('/user/0'); |
||
| 30 | $I->seeResponseCodeIs(HttpCode::NOT_FOUND); |
||
| 31 | $I->seeResponseContainsJson([ |
||
| 32 | 'success' => false, |
||
| 33 | 'data' => [ |
||
| 34 | 'user' => null |
||
| 35 | ] |
||
| 36 | ]); |
||
| 37 | } |
||
| 39 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.