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'); }