當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ApiTester::failToGet方法代碼示例

本文整理匯總了PHP中ApiTester::failToGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP ApiTester::failToGet方法的具體用法?PHP ApiTester::failToGet怎麽用?PHP ApiTester::failToGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ApiTester的用法示例。


在下文中一共展示了ApiTester::failToGet方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     codecept_debug($ent);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['status'], 'A');
     $I->assertEquals($ent['zacetek'], '2010-02-01T00:00:00+0100');
     $I->assertEquals($ent['konec'], '2010-02-01T00:00:00+0100');
     $I->assertEquals($ent['delovnaObveza'], 2);
     $I->assertEquals($ent['izmenskoDelo'], true);
     $I->assertEquals("XXX", $ent['delovnoMesto']);
     $I->assertEquals($ent['individualnaPogodba'], true);
     $I->assertEquals($ent['jeZaposlenVdrugemJz'], TRUE);
     $I->assertEquals($ent['jeNastopajoci'], TRUE);
     $I->assertEquals($ent['oseba']['id'], $this->lookOseba1['id']);
     $I->assertEquals($ent['organizacijskaEnota'], $this->objOrgEnota1['id']);
     /**
      * še preverjanja avtorizacij, posebnih dovoljenj
      */
     $entOs = $this->obj4;
     $I->assertNotNull($entOs['oseba']);
     /*
      * uporabnik brez OsebniPodatki-read dovoljenja
      */
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$rudi, \IfiTest\AuthPage::$rudiPass);
     $resp = $I->failToGet($this->restUrl, $entOs['id']);
     codecept_debug($resp);
     $I->assertEquals(100099, $resp[0][0]['code']);
     /*
      * uporabnik z OsebniPodatki-read dovoljenjem
      */
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$cene, \IfiTest\AuthPage::$cenePass);
     $ent = $I->successfullyGet($this->restUrl, $entOs['id']);
 }
開發者ID:ifigenija,項目名稱:server,代碼行數:40,代碼來源:ZaposlitevCest.php

示例2: readZReadBrezReadZaEntitetoLasnika

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends createZWriteZWriteZaEntitetoLasnika
  * @param ApiTester $I
  */
 public function readZReadBrezReadZaEntitetoLasnika(\ApiTester $I)
 {
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$rudi, \IfiTest\AuthPage::$rudiPass);
     $resp = $I->failToGet($this->restUrl, $this->obj1['id']);
     codecept_debug($resp);
     $I->assertEquals(100099, $resp[0][0]['code']);
     $resp = $I->failToGetList($this->restUrl . "?lastnik=" . $this->lookUprizoritev5['id'], []);
     codecept_debug($resp);
     $I->assertEquals(1001140, $resp[0]['code']);
 }
開發者ID:ifigenija,項目名稱:server,代碼行數:16,代碼來源:AvtorizacijeCest.php

示例3: read

 /**
  * Preberem pogodbo in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['sifra'], 'ZZ123');
     $I->assertEquals($ent['vrednostVaj'], 33.33);
     $I->assertEquals($ent['vrednostVaje'], 22.22);
     $I->assertEquals($ent['vrednostPredstave'], 44.44);
     $I->assertEquals($ent['vrednostVaje'], 22.22);
     $I->assertEquals($ent['placiloNaVajo'], false);
     $I->assertEquals($ent['planiranoSteviloVaj'], 10);
     $I->assertEquals($ent['jeAvtorskePravice'], false, "jeAvtorskePravice");
     $I->assertEquals($ent['opis'], 'xx');
     $I->assertEquals($ent['oseba']['id'], $this->lookOseba1['id']);
     $I->assertEquals($ent['popa']['id'], $this->lookPopa1['id']);
     $I->assertEquals($ent['trr'], $this->objTrr['id']);
     $I->assertEquals($ent['zacetek'], '2012-02-01T00:00:00+0100');
     $I->assertEquals($ent['konec'], '2014-02-01T00:00:00+0100');
     $I->assertEquals($ent['zaposlenVDrJz'], true, "zaposlen v drugem JZ");
     $I->assertEquals($ent['samozaposlen'], FALSE, "samozaposlen");
     $I->assertEquals($ent['igralec'], true, "igralec");
     $I->assertEquals($ent['procentOdInkasa'], 5.1);
     $I->assertEquals($ent['jeProcentOdInkasa'], true);
     /**
      * $$ še alternacije
      */
     /**
      * še preverjanja avtorizacij, posebnih dovoljenj
      */
     $entOs = $this->obj4;
     $I->assertNotNull($entOs['oseba']);
     $I->assertNull($entOs['popa']);
     $entPoOs = $this->obj8;
     $I->assertNotNull($entPoOs['oseba']);
     $I->assertNotNull($entPoOs['popa']);
     /*
      * uporabnik brez Pogodba-read dovoljenja
      */
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$breznik, \IfiTest\AuthPage::$breznikPass);
     $resp = $I->failToGet($this->restUrl, $entOs['id']);
     codecept_debug($resp);
     $I->assertEquals(100099, $resp[0][0]['code']);
     /*
      * uporabnik brez OsebniPodatki-read dovoljenja
      */
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$rudi, \IfiTest\AuthPage::$rudiPass);
     $resp = $I->failToGet($this->restUrl, $entOs['id']);
     codecept_debug($resp);
     $I->assertEquals(100099, $resp[0][0]['code']);
     /*
      * čim je od popa ni več osebni podatek 
      */
     $ent = $I->successfullyGet($this->restUrl, $entPoOs['id']);
     /*
      * uporabnik z OsebniPodatki-read dovoljenjem
      */
     $I->amHttpAuthenticated(\IfiTest\AuthPage::$cene, \IfiTest\AuthPage::$cenePass);
     $ent = $I->successfullyGet($this->restUrl, $entOs['id']);
 }
開發者ID:ifigenija,項目名稱:server,代碼行數:65,代碼來源:PogodbaCest.php


注:本文中的ApiTester::failToGet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。