本文整理汇总了PHP中ApiTester::seeResponseEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::seeResponseEquals方法的具体用法?PHP ApiTester::seeResponseEquals怎么用?PHP ApiTester::seeResponseEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTester
的用法示例。
在下文中一共展示了ApiTester::seeResponseEquals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteDiscussion
public function deleteDiscussion(ApiTester $I)
{
$I->wantTo('delete a discussion via API');
$user = $I->amAuthenticated();
$user->groups()->attach(4);
// Make the user a moderator
$discussion = Factory::create('Flarum\\Core\\Models\\Discussion', ['start_user_id' => $user->id]);
$I->sendDELETE($this->endpoint . '/' . $discussion->id);
$I->seeResponseCodeIs(204);
$I->seeResponseEquals('');
$I->expect('the discussion was deleted in the database');
$I->dontSeeRecord('discussions', ['id' => $discussion->id]);
}
示例2: TreeHash
}
$data[0] = 'A';
$data[1] = 'B';
$data[2] = 'C';
$data[3] = 'D';
$treeHash = new TreeHash();
$treeHash->update($data);
$treeHash = bin2hex($treeHash->complete());
$hash = hash('sha256', $data);
$I->haveHttpHeader('Content-Type', 'application/octet-stream');
$I->haveHttpHeader('x-amz-archive-description', 'test123');
$I->haveHttpHeader('x-amz-sha256-tree-hash', $treeHash);
$I->haveHttpHeader('x-amz-content-sha256', $hash);
$I->sendPOST('/-/vaults/testvault/archives', $data);
$I->seeResponseCodeIs(201);
$I->seeResponseEquals('');
$archiveID = $I->grabHttpHeader('x-amz-archive-id');
$I->haveHttpHeader('Content-Type', 'application/json');
$I->sendPOST('/-/vaults/testvault/jobs', ['Type' => 'archive-retrieval', 'ArchiveId' => $archiveID]);
$I->seeResponseCodeIs(202);
$jobID = $I->grabHttpHeader('x-amz-job-id');
$I->sendGET("/-/vaults/testvault/jobs/{$jobID}");
$I->seeResponseCodeIs(200);
$I->seeResponseContainsJson(['StatusCode' => 'InProgress']);
$I->sendPOST("/-/vaults/testvault/jobs/{$jobID}/force-complete", []);
$I->seeResponseCodeIs(200);
$I->sendGET("/-/vaults/testvault/jobs/{$jobID}");
$I->seeResponseCodeIs(200);
$I->seeResponseContainsJson(['StatusCode' => 'Succeeded']);
$I->sendGET("/-/vaults/testvault/jobs/{$jobID}/output");
$I->seeResponseCodeIs(200);