本文整理汇总了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']));
示例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");
}