public function getApiRootInfo(CoreApiTester $I) { $I->wantTo('API: GET api meta info'); $I->sendGET('/api', $this->apikeyParam); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseJsonMatchesJsonPath('$.api_creator'); $I->seeResponseJsonMatchesJsonPath('$.api_name'); $I->seeResponseJsonMatchesJsonPath('$.api_reference_url'); $I->seeResponseJsonMatchesJsonPath('$.api_source'); $I->seeResponseJsonMatchesJsonPath('$.api_version'); }
/** * @param CoreApiTester $I */ public function getSingleBrandTest(CoreApiTester $I) { $I->wantTo('BRAND: GET a brand by given ID: 1'); $I->sendGET('/api/static/brand/1', $this->apikeyParam); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseJsonMatchesJsonPath('$.payload[0].id'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].country_id'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].created_at'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].logo_uri'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].name'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].price_base_new'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].price_base_old'); $I->seeResponseJsonMatchesJsonPath('$.payload[0].settings'); }