本文整理汇总了PHP中ApiTester::successfullyCreate方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::successfullyCreate方法的具体用法?PHP ApiTester::successfullyCreate怎么用?PHP ApiTester::successfullyCreate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTester
的用法示例。
在下文中一共展示了ApiTester::successfullyCreate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dodajVecPostnihNaslovov
/**
* Dodam poštni naslov na osebo
* @depends create
*
* @param ApiTester $I
*/
public function dodajVecPostnihNaslovov(\ApiTester $I)
{
codecept_debug($this->lookDrzavaId);
$data = ["oseba" => $this->obj1['id'], "naziv" => "privzeti naslov", "ulica" => "cmd", "posta" => "2250", "postaNaziv" => "Ptuj", "pokrajina" => "Štajerska", "drzava" => $this->lookDrzavaId];
$I->assertTrue(true, "začasno");
$this->objpostni = $ent = $I->successfullyCreate($this->naslUrl, $data);
codecept_debug($ent);
$I->assertGuid($ent['id']);
$data = ["oseba" => $this->obj1['id'], "naziv" => "naslov1", "ulica" => "cmd 16", "ulicaDva" => "cankarjeva 16", "posta" => "2250", "postaNaziv" => "Ptuj", "pokrajina" => "Štajerska", "drzava" => $this->lookDrzavaId];
$this->objpostni2 = $ent = $I->successfullyCreate($this->naslUrl, $data);
$I->assertGuid($ent['id']);
codecept_debug($ent);
$data = ["oseba" => $this->obj2['id'], "naziv" => "naslov2", "ulica" => "prešernova 32", "ulicaDva" => "cankarjeva 16", "posta" => "2250", "postaNaziv" => "Ptuj", "pokrajina" => "Štajerska", "drzava" => $this->lookDrzava['id']];
$this->objpostni3 = $ent = $I->successfullyCreate($this->naslUrl, $data);
$I->assertGuid($ent['id']);
codecept_debug($ent);
}
示例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);
}