当前位置: 首页>>代码示例>>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;未经允许,请勿转载。