public function emptyResponse(\Step\Api\User $I) { $I->am('an app'); $I->wantTo('get the preview of a file without a valid fileId'); $I->amGoingTo("send a fileId which doesn't exist"); $I->expectTo("receive a 404"); $I->getUserCredentialsAndUseHttpAuthentication(); $url = $this->apiUrl . '/9999999/1920/1080'; $I->sendGET($url); $I->seeResponseCodeIs(404); }
public function fileNotFoundPage(\Step\Api\User $I) { $I->am('an app'); $I->wantTo('download a file without a valid fileId'); $I->amGoingTo("send a fileId which doesn't exist"); $I->expectTo("be redirected to an error 404 page"); $I->getUserCredentialsAndUseHttpAuthentication(); $url = $this->apiUrl . '/9999999'; $I->sendGET($url); $I->seeResponseCodeIs(404); $I->seeHttpHeader('Content-type', 'text/html; charset=UTF-8'); }
/** * @depends getConfig * * @param \Step\Api\User $I */ public function getEmptyConfig(\Step\Api\User $I) { $I->emptyMyConfigFile(); $I->am('an app'); $I->wantTo('get the current Gallery configuration'); $I->expectTo('see empty features'); $this->tryToGetAValidConfig($I); $I->seeResponseContainsJson(['features' => []]); $I->seeResponseContainsJson($this->mediaTypes); $I->fixMyConfigFile(); }