本文整理汇总了PHP中ApiTester::successfullyUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::successfullyUpdate方法的具体用法?PHP ApiTester::successfullyUpdate怎么用?PHP ApiTester::successfullyUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTester
的用法示例。
在下文中一共展示了ApiTester::successfullyUpdate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: odstranimZaposlitev
/**
*
* @depends create
* @param ApiTester $I
*/
public function odstranimZaposlitev(\ApiTester $I)
{
$ent = $I->successfullyGet($this->restUrl, $this->obj5teh['id']);
$I->assertEquals($ent['zaposlitev'], $this->objZaposlitev['id'], "zaposlitev");
$I->assertEquals($ent['zaposlen'], true);
// v validaciji se bi moralo postaviti na true, če je zaposlitev
// odstranimo zaposlitev
$ent['zaposlitev'] = null;
$ent = $I->successfullyUpdate($this->restUrl, $ent['id'], $ent);
$I->assertEquals($ent['zaposlitev'], null, "zaposlitev");
$I->assertEquals($ent['zaposlen'], false);
// preverimo zaposlitev po Get
$ent = $I->successfullyGet($this->restUrl, $ent['id']);
$I->assertEquals($ent['zaposlitev'], null, "zaposlitev");
$I->assertEquals($ent['zaposlen'], false);
}
示例2: dodajMapaAsserti
/**
* test Mapa-append assertov
*
* @depends kreirajPodMape
* @param ApiTester $I
*/
public function dodajMapaAsserti(\ApiTester $I)
{
/**
* assert po lastniku
*/
$I->amHttpAuthenticated(\IfiTest\AuthPage::$vihra, \IfiTest\AuthPage::$vihraPass);
$data = ['ime' => "assert lastnik vihra", 'javniDostop' => '', 'parent' => $this->pod5['id']];
$resp = $I->failToCreate($this->mapaUrl, $data);
codecept_debug($resp);
$I->assertEquals(1007008, $resp[0]['code']);
$data['parent'] = $this->pod6['id'];
//lastnik vihra
$m = $I->successfullyCreate($this->mapaUrl, $data);
/**
* assert po javnem dostopu
*/
$data = ['ime' => "assert javni dostop vihra", 'javniDostop' => '', 'parent' => $this->pod4['id']];
$resp = $I->failToCreate($this->mapaUrl, $data);
codecept_debug($resp);
$I->assertEquals(1007008, $resp[0]['code']);
/**
* spremenimo javni dostop bodoče parent mape
*/
$I->amHttpAuthenticated(\IfiTest\AuthPage::$admin, \IfiTest\AuthPage::$adminPass);
$mapa = $I->successfullyGet($this->mapaUrl, $this->pod4['id']);
$mapa['javniDostop'] = 'RWA';
$this->pod4 = $I->successfullyUpdate($this->mapaUrl, $mapa['id'], $mapa);
/**
* ponovimo isti dostop, da vidimo, če spremenjen dostop javni sedaj pomaga
*/
$I->amHttpAuthenticated(\IfiTest\AuthPage::$vihra, \IfiTest\AuthPage::$vihraPass);
$resp = $I->successfullyCreate($this->mapaUrl, $data);
/**
* assert po ACL-ju dostop po acl-ju
*/
$I->amHttpAuthenticated(\IfiTest\AuthPage::$vlado, \IfiTest\AuthPage::$vladoPass);
$data = ['ime' => "assert acl vlado", 'javniDostop' => '', 'parent' => $this->pod5['id']];
$resp = $I->failToCreate($this->mapaUrl, $data);
codecept_debug($resp);
$I->assertEquals(1007008, $resp[0]['code']);
/**
* dodamo acl za dovoljenje, ki ga ima tudi uporabnik
*/
$I->amHttpAuthenticated(\IfiTest\AuthPage::$admin, \IfiTest\AuthPage::$adminPass);
$dataAcl = ['mapa' => $this->pod5['id'], 'perm' => $this->lookPermission2['id'], 'dostop' => 'RAW'];
$mapaAcl = $I->successfullyCreate($this->aclUrl, $dataAcl);
/**
* ponovimo poskus kreiranja, sedaj ko ima parent mapa dodan acl
*/
$m = $I->successfullyCreate($this->mapaUrl, $data);
}