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


PHP ApiTester::assertEmpty方法代码示例

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


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

示例1: function

$I->amGoingTo('Get an existent organization on different information levels');
$get_org = function ($level, $orgs) use($I) {
    $I->amGoingTo("Request Org {$level} information");
    $query = $level ? '?level=' . $level : '';
    $I->sendGET('dev/organization/' . $orgs[array_rand($orgs)] . $query);
    $I->seeResponseCodeIs(200);
    $org = json_decode($I->grabResponse(), true);
    $I->assertTrue(is_numeric($org['size']), 'has total of members');
    $I->assertTrue(is_array($org['members']), 'has list of members');
    $I->assertGreaterThanOrEqual(1, $org['size'], 'organization has at least one member');
    $I->assertEquals(sizeof($org['members']), $org['size'], 'total is correctly calculated');
    $I->assertTrue(is_string($org['members'][0]['username']), 'first member has "username"');
    return $org;
};
$org = $get_org('basic', $orgs);
$I->assertEmpty($org['members'][0]['name']);
$I->assertEmpty($org['members'][0]['repos']);
$I->assertEmpty($org['members'][0]['rate']);
$org = $get_org(null, $orgs);
$I->assertTrue(is_string($org['members'][0]['name']));
$I->assertTrue(is_numeric($org['members'][0]['repos']));
$I->assertEmpty($org['members'][0]['rate']);
$org = $get_org('user', $orgs);
$I->assertTrue(is_string($org['members'][0]['name']));
$I->assertTrue(is_numeric($org['members'][0]['repos']));
$I->assertEmpty($org['members'][0]['rate']);
$org = $get_org('complete', $sm_orgs);
//using only small orgs ensures we won't timeout from taking forever at GitHub
$I->assertTrue(is_string($org['members'][0]['name']));
$I->assertTrue(is_numeric($org['members'][0]['repos']));
$I->assertTrue(is_numeric($org['members'][0]['rate']));
开发者ID:igorsantos07,项目名称:developer-shop,代码行数:31,代码来源:OrganizationCept.php

示例2: dodajDvaTrr

 /**
  * Dodam dva računa 
  * 
  * @depends  create
  * @param ApiTester $I
  */
 public function dodajDvaTrr(\ApiTester $I)
 {
     $data = ['oseba' => $this->obj1['id'], "banka" => "NLB", "stevilka" => "123456677", "swift" => "sdfsdf", "bic" => "xxxx"];
     $this->objtrr = $trr = $I->successfullyCreate($this->trrUrl, $data);
     $I->assertEquals('NLB', $trr['banka']);
     $I->assertEquals($trr['oseba'], $this->obj1['id'], "osebe ni");
     $I->assertEmpty($trr['popa'], "popa mora biti null");
     $data['stevilka'] = "44444444";
     $data['banka'] = "NKBM";
     $trr = $this->trr = $I->successfullyCreate($this->trrUrl, $data);
     $I->assertEquals('44444444', $trr['stevilka'], "stevilka  drugi trr");
 }
开发者ID:ifigenija,项目名称:server,代码行数:18,代码来源:OsebaCest.php


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