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'); }
/** * @param \Step\Api\User $I * @param array $params * @param int $id1 * @param int $id2 */ private function getThumbnails(\Step\Api\User $I, $params, $id1, $id2) { $I->getUserCredentialsAndUseHttpAuthentication(); $I->haveHttpHeader('Accept', 'text/event-stream'); $params['ids'] = $id1 . ';' . $id2; $I->sendGET($this->apiUrl, $params); $I->seeResponseCodeIs(200); $I->seeHttpHeader('Content-type', 'text/event-stream;charset=UTF-8'); $I->seeResponseContains('"status":200'); $I->seeResponseContains('"fileid":"' . $id1 . '","status":200'); $I->seeResponseContains('"fileid":"' . $id2 . '","status":200'); }