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


PHP ApiTester::assertGreaterThanOrEqual方法代码示例

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


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

示例1: winTipsCountGreaterOrEqualToWinTips

 public function winTipsCountGreaterOrEqualToWinTips(ApiTester $I)
 {
     $I->sendGET($this->endpoint . SOURCE);
     $tips = $I->grabDataFromResponseByJsonPath('$.tips');
     foreach ($tips[0] as $tip) {
         $I->assertGreaterThanOrEqual($tip['win_tips'], $tip['win_tips_count'], 'win_tips_count less than win_tips');
     }
 }
开发者ID:bogdanbuciu,项目名称:tester,代码行数:8,代码来源:probaCest.php

示例2: ApiTester

<?php

$I = new ApiTester($scenario);
$I->wantTo('Check for hot tips');
//$I->amHttpAuthenticated('service_user', '123456');
////$I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded');
$I->sendGet('http://api.invendium-dev.com/?source=');
//$I->seeResponseCodeIs(200);
//$I->seeResponseIsJson();
//$I->seeResponseContains('odds_rounded');
//$I->seeResponseContains('popularity');
//$I->seeResponseContainsJson(array('sport' => 'Football'));
$tips = $I->grabDataFromResponseByJsonPath('$.tips');
$array = array();
foreach ($tips[0] as $tip) {
    $array[] = $tip['sportname'];
}
$array = array_count_values($array);
foreach ($array as $sportname => $tipsCount) {
    $I->assertGreaterThanOrEqual('10', $tipsCount, "{$sportname} has only {$tipsCount} tips.");
}
开发者ID:bogdanbuciu,项目名称:tester,代码行数:21,代码来源:ShowTipsCept.php

示例3: ApiTester

$sm_orgs = Fixtures::get('small_orgs');
$I = new ApiTester($scenario);
$I->wantTo('list of developers of an organization');
$I->amGoingTo('Get a non-existent organization');
$I->sendGET('dev/organization/' . $faker->lexify('??????????'));
$I->seeResponseCodeIs(404);
$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']));
开发者ID:igorsantos07,项目名称:developer-shop,代码行数:31,代码来源:OrganizationCept.php


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