示例#1
0
<?php

/* @var \Codeception\Scenario $scenario */
$I = new TestGuy($scenario);
$I->wantTo('perform some POST requests');
$I->sendPOST('/post', ['id' => 400]);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['message' => 'home', 'id' => 400]);
$I->sendPOST('/hello/peter', ['say' => 'nice to meet you!']);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(['message' => 'nice to meet you!']);
示例#2
0
文件: AnyCept.php 项目: pklink/hahns
<?php

/* @var \Codeception\Scenario $scenario */
$I = new TestGuy($scenario);
$I->wantTo('check events');
$I->sendDELETE('/any');
$I->seeResponseEquals('any');
$I->sendGET('/any');
$I->seeResponseEquals('any');
$I->sendPATCH('/any');
$I->seeResponseEquals('any');
$I->sendPOST('/any');
$I->seeResponseEquals('any');
$I->sendPUT('/any');
$I->seeResponseEquals('any');