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


PHP ApiTester::successfullyUpdate方法代码示例

本文整理汇总了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);
 }
开发者ID:ifigenija,项目名称:server,代码行数:21,代码来源:AlternacijaCest.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::successfullyUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。