コード例 #1
2
ファイル: RestTest.php プロジェクト: corcre/elabftw
 public function testPut()
 {
     $this->module->sendPUT('/rest/user/', ['name' => 'laura']);
     $this->module->seeResponseContains('*****@*****.**');
     $this->module->seeResponseContainsJson(['name' => 'laura']);
     $this->module->dontSeeResponseContainsJson(['name' => 'john']);
 }
コード例 #2
0
ファイル: Api.php プロジェクト: kdl-qa/vpn-codeception
 function apiDeActivateAgency()
 {
     $this->restModule->haveHttpHeader('Content-Type', 'application/json');
     $this->restModule->haveHttpHeader('token', User::getAdminToken());
     $this->restModule->sendPUT('/users/' . User::getUserId(3) . '/change-status', ['status' => 0, 'disableReason' => 'disabled']);
     $agency_data = $this->restModule->grabResponse();
     file_put_contents(codecept_data_dir('agency_data.json'), $agency_data);
 }