當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。