本文整理汇总了PHP中ApiTester::assertNotNull方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::assertNotNull方法的具体用法?PHP ApiTester::assertNotNull怎么用?PHP ApiTester::assertNotNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiTester
的用法示例。
在下文中一共展示了ApiTester::assertNotNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: silksImageNotNullIfHorseracing
public function silksImageNotNullIfHorseracing(ApiTester $I)
{
$I->sendGET($this->endpoint . SOURCE);
$tips = $I->grabDataFromResponseByJsonPath('$.tips');
foreach ($tips[0] as $tip) {
if ($tip['sportname'] == 'Horse Racing') {
$I->assertNotNull($tip['silks_image'], 'silks_image is NULL at HorseRacing');
}
}
}
示例2: 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']);
}
示例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']);
}