当前位置: 首页>>代码示例>>PHP>>正文


PHP ApiTester::successfullyCreate方法代码示例

本文整理汇总了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);
 }
开发者ID:ifigenija,项目名称:server,代码行数:23,代码来源:OsebaCest.php

示例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);
 }
开发者ID:ifigenija,项目名称:server,代码行数:57,代码来源:MapaScenarijCest.php


注:本文中的ApiTester::successfullyCreate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。