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


PHP ApiTester::assertFalse方法代碼示例

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


在下文中一共展示了ApiTester::assertFalse方法的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->obj['id']);
     codecept_debug($ent);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['sifra'], '99');
     $I->assertEquals($ent['naziv'], 'B');
     $I->assertEquals($ent['vodja'], $this->objZaposlitev1['id']);
     $I->assertEquals($ent['namestnik'], $this->objZaposlitev2['id']);
     $I->assertFalse(isset($ent['parent']));
 }
開發者ID:ifigenija,項目名稱:server,代碼行數:17,代碼來源:OrganizacijskaEnotaCest.php

示例2: removeTokens

 public function removeTokens(ApiTester $I)
 {
     $user = $I->createUser();
     $I->getMongo();
     $tokens = ['reset_password' => ["token" => '$2y$10$iiPJClTgDWOgP0SR1ZgwLeMO4qNZkGFXHRjRpkyl.xC2K6OLPxExK', "expired" => time() + 30], 'verify_email' => ["token" => '$3y$10$iiPJClTgDWOgP0SR1ZgwLeMO4qNZkGFXHRjRpkyl.xC1K6OLPxExK', "expired" => time() - 1]];
     $filter = ['_id' => new MongoDB\BSON\ObjectID($user->_id)];
     $bulk = new MongoDB\Driver\BulkWrite();
     $bulk->update($filter, ['$set' => ['tokens' => $tokens, 'refreshTokens.0.expires' => time() - 1]]);
     $I->getMongo()->executeBulkWrite('gandalf_test.users', $bulk);
     exec('php artisan tokens:delete');
     $query = new MongoDB\Driver\Query($filter);
     $rows = $I->getMongo()->executeQuery('gandalf_test.users', $query);
     $user = $rows->toArray()[0];
     $I->assertFalse(property_exists($user->tokens, 'verify_email'), 'Expired verify_email token don\'t deleted');
     $I->assertEquals(0, count($user->refreshTokens), 'Expired refresh token do not deleted');
 }
開發者ID:Nebo15,項目名稱:gandalf.api,代碼行數:16,代碼來源:UsersCest.php

示例3: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj['id']);
     codecept_debug($ent);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['faza'], 'produkcija');
     $I->assertEquals($ent['naslov'], 'zz');
     $I->assertEquals($ent['podnaslov'], 'zz');
     $I->assertEquals($ent['delovniNaslov'], 'zz');
     $I->assertEquals($ent['datumZacStudija'], '2011-02-01T00:00:00+0100');
     $I->assertEquals($ent['datumPremiere'], '2012-02-01T00:00:00+0100');
     $I->assertEquals($ent['maticniOder'], $this->lookProstor['id']);
     $I->assertEquals($ent['stOdmorov'], 1);
     //        $I->assertEquals($ent['avtor'], 'avzz');
     $I->assertEquals($ent['gostujoca'], FALSE);
     $I->assertEquals($ent['trajanje'], 2);
     $I->assertEquals($ent['opis'], 'yy');
     $I->assertEquals($ent['arhIdent'], 'zz');
     $I->assertEquals($ent['arhOpomba'], 'zz');
     $I->assertEquals($ent['datumZakljucka'], '2019-02-01T00:00:00+0100');
     $I->assertEquals($ent['sloAvtor'], FALSE);
     $I->assertEquals($ent['jeKoprodukcija'], FALSE);
     $I->assertEquals($ent['kratkiNaslov'], 'zz');
     $I->assertEquals($ent['besedilo']['id'], $this->lookBesedilo['id'], "Besedilo");
     $I->assertEquals($ent['zvrstUprizoritve'], null);
     $I->assertEquals($ent['zvrstSurs'], $this->lookZvrstSurs['id']);
     $I->assertEquals($ent['internacionalniNaslov'], 'zz');
     //        $I->assertEquals($ent['steviloVaj'], 4,"Število vaj");
     $I->assertEquals($ent['planiranoSteviloVaj'], 5);
     $I->assertEquals($ent['krstna'], true, "krstna");
     $I->assertEquals($ent['prvaSlovenska'], true);
     $I->assertEquals($ent['naslovIzvirnika'], 'zz');
     $I->assertEquals($ent['podnaslovIzvirnika'], 'zz');
     $I->assertFalse(isset($ent['producent']), "producent");
     $I->assertTrue(isset($ent['funkcije']));
     $I->assertTrue(isset($ent['arhivi']));
     $I->assertTrue(isset($ent['rekviziterstva']));
     $I->assertTrue(isset($ent['vaje']));
     $I->assertTrue(isset($ent['predstave']));
     //        $I->assertTrue(isset($ent['gostujoce']));
     $I->assertEquals(0, count($ent['funkcije']));
     $I->assertEquals(0, count($ent['arhivi']));
     $I->assertEquals(0, count($ent['rekviziterstva']));
     $I->assertEquals(0, count($ent['vaje']));
     $I->assertEquals(0, count($ent['predstave']));
     //        $I->assertEquals(0, count($ent['gostujoce']));
 }
開發者ID:ifigenija,項目名稱:server,代碼行數:53,代碼來源:UprizoritevCest.php


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