当前位置: 首页>>代码示例>>PHP>>正文


PHP ApiTester::assertEquals方法代码示例

本文整理汇总了PHP中ApiTester::assertEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester::assertEquals方法的具体用法?PHP ApiTester::assertEquals怎么用?PHP ApiTester::assertEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ApiTester的用法示例。


在下文中一共展示了ApiTester::assertEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: read

 /**
  * Preberem zapis
  * 
  * @param ApiTester $I
  * @depends create
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj['id']);
     $I->assertEquals($ent['sifra'], 'ZZ');
     $I->assertEquals($ent['naziv'], 'uu');
     $I->assertEquals($ent['opis'], 'zz');
 }
开发者ID:ifigenija,项目名称:server,代码行数:13,代码来源:ZvrstUprizoritveCest.php

示例2: readDatum

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function readDatum(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj3['id']);
     codecept_debug($ent);
     $I->assertEquals($ent['zacetek'], '2009-09-14T00:00:00+0200');
     //konec spremenjen v +0200
     $ent = $I->successfullyGet($this->restUrl, $this->obj2['id']);
     $I->assertEquals($ent['zacetek'], '2003-02-01T00:00:00+0100');
 }
开发者ID:ifigenija,项目名称:server,代码行数:15,代码来源:TimeZoneCest.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->obj1['id']);
     codecept_debug($ent);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['name'], 'TESTA');
     $I->assertEquals($ent['description'], 'to je A');
     $I->assertEquals($ent['builtIn'], false);
     //sam določi
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:PermissionCest.php

示例4: 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']);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['oznaka'], 'AA');
     $I->assertEquals($ent['naziv'], 'uu');
     $I->assertEquals($ent['aktiven'], TRUE);
     $I->assertEquals($ent['znacka'], TRUE);
     $I->assertEquals($ent['ikona'], 'AA');
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:VrstaZapisaCest.php

示例5: getDiscussions

 public function getDiscussions(ApiTester $I)
 {
     $I->wantTo('get discussions via API');
     $discussions = Factory::times(2)->create('Flarum\\Core\\Models\\Discussion');
     $I->sendGET($this->endpoint);
     $I->seeResponseCodeIs(200);
     $I->seeResponseIsJson();
     $I->expect('there are two discussions in the response');
     $I->assertEquals(2, count($I->grabDataFromJsonResponse('discussions')));
     $I->expect('the discussions exist');
     $I->seeResponseContainsJson(['id' => (string) $discussions[0]->id, 'title' => $discussions[0]->title]);
     $I->seeResponseContainsJson(['id' => (string) $discussions[1]->id, 'title' => $discussions[1]->title]);
 }
开发者ID:Qiang1234,项目名称:core,代码行数:13,代码来源:DiscussionsResourceCest.php

示例6: createFirst

 public function createFirst(ApiTester $I)
 {
     $I->createAndLoginUser();
     $I->createProjectAndSetHeader();
     $table_data = $I->createTable();
     $table_id_no_decisions = $table_data->_id;
     $table_data = $I->createTable();
     $table_id_with_decisions = $table_data->_id;
     $decision_table = $I->makeDecision($table_id_with_decisions);
     $I->assertEquals('Approve', $decision_table->final_decision);
     $I->sendGET('api/v1/admin/decisions?table_id=' . $table_id_no_decisions);
     $I->seeResponseCodeIs(404);
     # filter by table_id
     $I->sendGET('api/v1/admin/decisions?table_id=' . $table_id_with_decisions);
     $I->assertTableDecisionsForAdmin('decision', '$.data[*]');
     foreach ($I->getResponseFields()->data as $item) {
         $I->sendGET('api/v1/admin/decisions/' . $item->_id);
         $I->assertTableDecisionsForAdmin();
     }
     $I->sendGET('api/v1/admin/decisions/123');
     $I->seeResponseCodeIs(404);
     $decision_data = $I->makeDecision($table_id_with_decisions, ['borrowers_phone_verification' => 'invalid', 'contact_person_phone_verification' => 'invalid', 'internal_credit_history' => 'invalid', 'employment' => false, 'property' => false]);
     $I->assertEquals($table_data->variants[0]->default_decision, $decision_data->final_decision);
     $I->sendGET('api/v1/admin/decisions');
     $I->assertTableDecisionsForAdmin('decision', '$.data[*]');
     $decisions = $I->getResponseFields()->data;
     $I->assertEquals('invalid', $decisions[0]->request->borrowers_phone_verification);
     $I->assertEquals('Positive', $decisions[1]->request->borrowers_phone_verification);
     foreach ($I->getResponseFields()->data as $item) {
         $I->sendGET('api/v1/admin/decisions/' . $item->_id);
         $I->assertTableDecisionsForAdmin();
     }
     $I->loginConsumer($I->createConsumer());
     $I->sendGET('api/v1/admin/decisions');
     $I->seeResponseCodeIs(401);
 }
开发者ID:Nebo15,项目名称:gandalf.api,代码行数:36,代码来源:DecisionsCest.php

示例7: read

 /**
  * Preberem abonma
  * 
  * @param ApiTester $I
  * @depends create
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     codecept_debug($ent);
     $I->assertEquals($ent['stPredstav'], 5);
     $I->assertEquals($ent['stKuponov'], 55);
     $I->assertEquals($ent['ime'], 'zz');
     $I->assertEquals($ent['opis'], 'zz');
     $I->assertEquals($ent['kapaciteta'], 444);
     $I->assertEquals($ent['barva'], '#123456');
 }
开发者ID:ifigenija,项目名称:server,代码行数:17,代码来源:AbonmaCest.php

示例8: 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['sifra'], '9000');
     $I->assertEquals($ent['ime'], 'zz');
     $I->assertEquals($ent['opis'], 'yy');
 }
开发者ID:ifigenija,项目名称:server,代码行数:15,代码来源:TipDodatkaCest.php

示例9: 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->assertGuid($ent['id']);
     $I->assertEquals($ent['sifra'], '99');
     $I->assertEquals($ent['ime'], 'zz');
     $I->assertEquals($ent['opis'], 'yy');
     $I->assertEquals($ent['imeZenski'], 'yy');
     $I->assertEquals($ent['podrocje'], 'umetnik');
     $I->assertEquals($ent['sort'], 9999);
     $I->assertTrue(isset($ent['funkcije']), "ali so funkcije");
     $I->assertEquals(0, count($ent['funkcije']), "število funkcij");
 }
开发者ID:ifigenija,项目名称:server,代码行数:20,代码来源:TipFunkcijeCest.php

示例10: 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']);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['celotnaVrednost'], 3.72);
     $I->assertEquals($ent['nasDelez'], 3.72);
     $I->assertEquals($ent['celotnaVrednostGostovSZ'], 3.11);
     $dif = $ent['celotnaVrednost'] - $ent['celotnaVrednostGostovSZ'];
     $I->assertEquals($ent['celotnaVrednostMat'], $ent['celotnaVrednost'] - $ent['celotnaVrednostGostovSZ'], "cel. vr. matič.");
     $I->assertEquals($ent['zaproseno'], 1.22, "zaprošeno");
     $I->assertEquals($ent['lastnaSredstva'], $ent['nasDelez'] - $ent['zaproseno'] - $ent['drugiJavni'] - $ent['vlozekGostitelja'], "lastna sredstva");
     $I->assertEquals($ent['avtorskiHonorarji'], 1.24);
     $I->assertEquals($ent['avtorskiHonorarjiSamoz'], 1.24);
     $I->assertEquals($ent['tantieme'], 1.24);
     $I->assertEquals($ent['materialni'], 1.24);
     $I->assertEquals($ent['avtorskePravice'], 0);
     //        $I->assertEquals($ent['drugiViri'], 1.24);
     $I->assertEquals($ent['vlozekGostitelja'], 1.24);
     $I->assertEquals($ent['drugiJavni'], 1.24);
     $I->assertEquals($ent['obiskDoma'], 1);
     $I->assertEquals($ent['obiskKopr'], 1);
     $I->assertEquals($ent['obiskGost'], 1);
     $I->assertEquals($ent['obiskKoprGost'], 1);
     $I->assertEquals($ent['obiskZamejo'], 1);
     $I->assertEquals($ent['obiskKoprZamejo'], 1);
     $I->assertEquals($ent['obiskInt'], 0, "obisk Int");
     $I->assertEquals($ent['ponoviDoma'], 1);
     $I->assertEquals($ent['ponoviKopr'], 1);
     $I->assertEquals($ent['ponoviZamejo'], 1);
     $I->assertEquals($ent['ponoviKoprZamejo'], 1);
     $I->assertEquals($ent['ponoviGost'], 1);
     $I->assertEquals($ent['ponoviKoprGost'], 1);
     $I->assertEquals($ent['ponoviInt'], 0, "ponovi Int");
     $I->assertEquals($ent['uprizoritev']['id'], $this->lookUprizoritev['id']);
     $I->assertEquals($ent['tipProgramskeEnote'], $this->lookTipProgramskeEnote['id']);
     $I->assertEquals($ent['sort'], 1, 'sort');
     $I->assertEquals($ent['dokument'], null);
     $I->assertEquals($ent['stZaposUmet'], 1);
     $I->assertEquals($ent['stZaposDrug'], 1);
     $I->assertEquals($ent['stHonorarnihZun'], 1);
     $I->assertEquals($ent['stHonorarnihZunIgr'], 1);
     $I->assertEquals($ent['stHonorarnihZunIgrTujJZ'], 1);
     $I->assertEquals($ent['stHonorarnihZunSamoz'], 1);
 }
开发者ID:ifigenija,项目名称:server,代码行数:50,代码来源:ProgramPonovitevPrejsnjihCest.php

示例11: 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']);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['sifra'], 'ZZ');
     $I->assertEquals($ent['naziv'], 'yy');
     $I->assertEquals($ent['koprodukcija'], FALSE);
     $I->assertEquals($ent['maxFaktor'], 0.75);
     $I->assertEquals($ent['maxVsi'], 0.86);
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:TipProgramskeEnoteCest.php

示例12: 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']);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['uprizoritev']['id'], $this->lookUprizoritev['id']);
     $I->assertEquals($ent['krajGostovanja'], 'zz');
     $I->assertEquals($ent['drzavaGostovanja'], $this->objDrzava1['id']);
     $I->assertEquals($ent['ustanova'], 'zz');
     $I->assertEquals($ent['datumGostovanja'], '2011-02-01T00:00:00+0100');
     $I->assertEquals($ent['ponoviInt'], 9);
     $I->assertEquals($ent['ponoviKoprInt'], 9);
     $I->assertEquals($ent['obiskInt'], 9);
     $I->assertEquals($ent['obiskKoprInt'], 9);
     $I->assertEquals($ent['zaproseno'], 9.119999999999999, "izračunano zaprošeno");
     $I->assertEquals($ent['celotnaVrednost'], 45.6);
     $I->assertEquals($ent['nasDelez'], 45.6);
     $I->assertEquals($ent['transportniStroski'], 9.119999999999999);
     $I->assertEquals($ent['dnevPrvZad'], 9.119999999999999);
     $I->assertEquals($ent['tantieme'], 9.119999999999999);
     $I->assertEquals($ent['materialni'], 9.119999999999999);
     $I->assertEquals($ent['avtorskePravice'], 0);
     $I->assertEquals($ent['avtorskiHonorarji'], 9.119999999999999);
     $I->assertEquals($ent['avtorskiHonorarjiSamoz'], 9.119999999999999);
     $I->assertEquals($ent['vlozekGostitelja'], 2.34);
     $I->assertEquals($ent['lastnaSredstva'], $ent['nasDelez'] - $ent['zaproseno'] - $ent['drugiJavni'] - $ent['vlozekGostitelja'], "lastna sredstva");
     $I->assertEquals($ent['celotnaVrednostMat'], 0);
     //        $I->assertEquals($ent['drugiViri'], 9.12);
     $I->assertEquals($ent['drugiJavni'], 9.119999999999999);
     $I->assertEquals($ent['dokument'], NULL);
     $I->assertEquals($ent['gostitelj']['id'], $this->lookPopa1['id']);
     $I->assertEquals($ent['sort'], 1);
     $I->assertEquals($ent['imaKoprodukcije'], TRUE);
 }
开发者ID:ifigenija,项目名称:server,代码行数:39,代码来源:ProgramGostovanjeCest.php

示例13: 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['ime'], 'aa');
     $I->assertEquals($ent['komentar'], 'uu');
     $I->assertEquals($ent['lastnik'], $this->lookUser2['id']);
     $I->assertEquals($ent['javniDostop'], 'R', "javni dostop");
     $I->assertEquals($ent['parent'], $this->lookMapa1['id']);
 }
开发者ID:ifigenija,项目名称:server,代码行数:17,代码来源:MapaCest.php

示例14: ApiTester

<?php

$I = new ApiTester($scenario);
$I->wantTo('Insert items and checkout');
/**
 * @var array $item1
 * @var array $item2
 * @var int   $order
 */
require "_AddItems.php";
$I->amGoingTo('checkout');
$I->sendPATCH('cart');
$I->seeCodeAndJson(200, ['id' => $order, 'total' => floatify($item1['final_price'] + $item2['final_price'])]);
$I->amGoingTo('verify the order was really ~closed~');
$I->sendGET('cart');
$I->assertEquals(sizeof(json_decode($I->grabResponse())->items), 0, 'verify the cart is now empty');
开发者ID:igorsantos07,项目名称:developer-shop,代码行数:16,代码来源:CheckoutCept.php

示例15: 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


注:本文中的ApiTester::assertEquals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。