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


PHP PHPUnit_Framework_Assert::assertGreaterThan方法代码示例

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


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

示例1: it_can_return_its_id

 /**
  * @test
  */
 public function it_can_return_its_id()
 {
     $conn = $this->factory->createConnection('localhost');
     $channel = $this->factory->createChannel($conn);
     Assert::assertInternalType('integer', $channel->getChannelId());
     Assert::assertGreaterThan(0, $channel->getChannelId());
 }
开发者ID:treehouselabs,项目名称:queue,代码行数:10,代码来源:AbstractDriverChannelTest.php

示例2: seeInDatabase

 public function seeInDatabase($table, $criteria = array())
 {
     $res = $this->proceedSeeInDatabase($table, 'count(*)', $criteria);
     \PHPUnit_Framework_Assert::assertGreaterThan(0, $res, 'No matching records found');
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:5,代码来源:Db.php

示例3: imagesAreSimilarInPercent

 public function imagesAreSimilarInPercent($percent)
 {
     $similarity = ImageSimilarityJudge::judge($this->originalImage, $this->optimizedImage);
     $percent = $percent / 100;
     \PHPUnit_Framework_Assert::assertGreaterThan($percent, $similarity);
     return $this;
 }
开发者ID:lidoma,项目名称:image-optimizer,代码行数:7,代码来源:ImageAssertion.php

示例4: listEntities

 private function listEntities($entityType)
 {
     Debug::debug("List {$entityType}");
     $response = $this->sendRequest("{$entityType}", null, 'GET');
     PHPUnit_Framework_Assert::assertGreaterThan(0, count($response->data));
     return $response;
 }
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:7,代码来源:APICest.php

示例5: toBeLessThanOrEqualTo

 public function toBeLessThanOrEqualTo($expected)
 {
     if ($this->negate) {
         a::assertGreaterThan($expected, $this->actual);
     } else {
         a::assertLessThanOrEqual($expected, $this->actual);
     }
 }
开发者ID:jasonmccreary,项目名称:expect,代码行数:8,代码来源:Expect.php

示例6: responseContainsOnlyUsersWithTheEmail

 /**
  * @Given /^response contains only the user with the email "([^"]*)"$/
  */
 public function responseContainsOnlyUsersWithTheEmail($email)
 {
     $userList = $this->getResponseObject();
     Assertion::assertGreaterThan(0, count($userList), 'UserList was expected to contain one user only');
     foreach ($userList as $user) {
         Assertion::assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\User\\User', $user, 'Non User found in the response');
         Assertion::assertEquals($email, $user->email, "UserList was expected to contain only users with email '{$email}'");
     }
 }
开发者ID:Pixy,项目名称:ezpublish-kernel,代码行数:12,代码来源:User.php

示例7: testAPI

 public function testAPI()
 {
     $api = new RippleAPI(new Connection());
     $index = $api->currentLedgerIndex();
     PHPUnit::assertNotNull($index);
     PHPUnit::assertGreaterThan(6000000, $index);
     $index = $api->currentLedgerIndex();
     PHPUnit::assertNotNull($index);
     PHPUnit::assertGreaterThan(6000000, $index);
 }
开发者ID:deweller,项目名称:ripple-ws-client,代码行数:10,代码来源:RippleWSClientTest.php

示例8: testCLIAddUser

 public function testCLIAddUser()
 {
     // insert
     $this->app['Illuminate\\Contracts\\Console\\Kernel']->call('api:new-user', ['email' => 'samplecli@tokenly.co']);
     // load from repo
     $user_repo = $this->app->make('App\\Repositories\\UserRepository');
     $loaded_user_model = $user_repo->findByEmail('samplecli@tokenly.co');
     PHPUnit::assertNotEmpty($loaded_user_model);
     PHPUnit::assertGreaterThan(0, $loaded_user_model['id']);
     PHPUnit::assertEquals('samplecli@tokenly.co', $loaded_user_model['email']);
 }
开发者ID:CryptArc,项目名称:xchain,代码行数:11,代码来源:UserCommandTest.php

示例9: tryList

 public function tryList(FunctionalTester $I)
 {
     $I->wantTo("Check module list output");
     $this->routeMatch->setParam('action', 'show');
     $result = $this->controller->dispatch(new ConsoleRequest(array(0 => 'public/index.php', 1 => 'modules', 2 => 'list')));
     /** @var Zend\Http\PhpEnvironment\Response $response */
     $response = $this->controller->getResponse();
     \PHPUnit_Framework_Assert::assertEquals(200, $response->getStatusCode());
     \PHPUnit_Framework_Assert::assertEquals('', $result);
     \PHPUnit_Framework_Assert::assertInstanceOf('ComposerLockParser\\PackagesCollection', $this->viewModel->getPackages());
     \PHPUnit_Framework_Assert::assertGreaterThan(0, $this->viewModel->getPackages()->count());
     \PHPUnit_Framework_Assert::assertInstanceOf('ComposerLockParser\\Package', $this->viewModel->getPackages()->getByName('t4web/modules'));
 }
开发者ID:t4web,项目名称:Modules,代码行数:13,代码来源:ListCest.php

示例10: testAddBTCTransaction

 public function testAddBTCTransaction()
 {
     // insert
     $transaction_model = $this->txHelper()->createSampleTransaction('sample_btc_parsed_01.json');
     $parsed_tx = $transaction_model['parsed_tx'];
     // load from repo
     $tx_repo = $this->app->make('App\\Repositories\\TransactionRepository');
     $loaded_transaction_model = $tx_repo->findByTXID($parsed_tx['txid']);
     PHPUnit::assertNotEmpty($loaded_transaction_model);
     PHPUnit::assertEquals($parsed_tx['txid'], $loaded_transaction_model['txid']);
     PHPUnit::assertEquals(0, $loaded_transaction_model['is_mempool']);
     PHPUnit::assertEquals('00000000000000003a1e5abc2d7af7f38a614d2fcbafe309b7e8aa147d508a9c', $loaded_transaction_model['block_confirmed_hash']);
     PHPUnit::assertGreaterThan(0, $loaded_transaction_model['id']);
 }
开发者ID:CryptArc,项目名称:xchain,代码行数:14,代码来源:TransactionRepositoryTest.php

示例11: testBitstampDriver

 public function testBitstampDriver()
 {
     $client = $this->getQuoteClient();
     $quotes = $client->getQuotes('bitstamp', [['base' => 'USD', 'target' => 'BTC']]);
     if (getenv('ECHO_QUOTES')) {
         echo "\$quotes:\n" . json_encode($quotes, 192) . "\n";
     }
     PHPUnit::assertInstanceOf('Tokenly\\CryptoQuoteClient\\Quote', $quotes[0]);
     PHPUnit::assertGreaterThan(100, $quotes[0]['bid']);
     PHPUnit::assertGreaterThan(100, $quotes[0]['ask']);
     PHPUnit::assertGreaterThan(100, $quotes[0]['last']);
     $quote = $client->getQuote('bitstamp', 'USD', 'BTC');
     if (getenv('ECHO_QUOTES')) {
         echo "\$quote:\n" . json_encode($quote, 192) . "\n";
     }
     PHPUnit::assertGreaterThan(100, $quote['bid']);
     PHPUnit::assertGreaterThan(100, $quote['ask']);
     PHPUnit::assertGreaterThan(100, $quote['last']);
 }
开发者ID:tokenly,项目名称:crypto-quote-client,代码行数:19,代码来源:DriverIntegrationsTest.php

示例12: testAllScenarios

 public function testAllScenarios()
 {
     $starting_scenario_number = getenv('SCENARIO');
     if (!$starting_scenario_number) {
         $starting_scenario_number = 1;
     }
     // do all state tests in directory
     $scenario_number_count = count(glob(base_path() . '/tests/fixtures/scenarios/*.yml'));
     PHPUnit::assertGreaterThan(0, $scenario_number_count);
     for ($i = $starting_scenario_number; $i <= $scenario_number_count; $i++) {
         Log::debug("\n" . str_repeat('-', 60) . "\nBEGIN SCENARIO: {$i}\n" . str_repeat('-', 60));
         // clear the db
         if ($i > 1) {
             $this->resetForScenario();
         }
         try {
             $this->runScenario($i);
         } catch (Exception $e) {
             echo "\nFailed while running scenario {$i}\n";
             throw $e;
         }
     }
 }
开发者ID:CryptArc,项目名称:xchain,代码行数:23,代码来源:XChainScenariosTest.php

示例13: setupBeforeClass

 public static function setupBeforeClass()
 {
     parent::setUpBeforeClass();
     if (!file_exists(_PS_MODULE_DIR_ . '/prestafraud/prestafraud.php')) {
         $download = file_put_contents(_PS_CACHE_DIR_ . 'sandbox/prestafraud.zip', Tools::addonsRequest('module', array('id_module' => 4181)));
         Assert::assertGreaterThan(20000, $download, 'Fail download module from Addons');
         $extract = Tools::ZipExtract(_PS_CACHE_DIR_ . 'sandbox/prestafraud.zip', _PS_MODULE_DIR_);
         Assert::assertTrue($extract, 'Fail extract module');
         unlink(_PS_CACHE_DIR_ . 'sandbox/prestafraud.zip');
     }
     self::$prestafraud = Module::getInstanceByName('prestafraud');
     Assert::assertTrue(is_object(self::$prestafraud), 'Fail Module::getInstanceByName(\'prestafraud\')');
     Assert::assertEquals('prestafraud', self::$prestafraud->name);
     if (!Module::isInstalled('prestafraud')) {
         Assert::assertTrue((bool) self::$prestafraud->install());
     }
     Assert::assertTrue((bool) self::$prestafraud->isRegisteredInHook('actionValidateOrder'), 'Fail Module::isRegisteredInHook(\'actionValidateOrder\')');
     $uniqid = uniqid() . time();
     $email = 'prestabot+' . $uniqid . '@gmail.com';
     $shop_url = 'http://www.prestashop-unit-test-' . $uniqid . '.com/';
     $result = self::$prestafraud->_createAccount($email, $shop_url);
     Assert::assertTrue($result, implode(', ', self::$prestafraud->_errors));
 }
开发者ID:nmardones,项目名称:PrestaShop,代码行数:23,代码来源:PrestaShopSecurityTest.php

示例14: iShouldHaveAListOfPosts

 /**
  * @Then /^I should have a list of posts$/
  */
 public function iShouldHaveAListOfPosts()
 {
     Assert::assertGreaterThan(0, count(self::$categoryPosts));
 }
开发者ID:shortlist-digital,项目名称:agreable-catfish-importer-plugin,代码行数:7,代码来源:SitemapContext.php

示例15: seeInDatabaseCollection

 /**
  * Checks if collection contains an item.
  *
  * ``` php
  * <?php
  * $I->seeInDatabaseCollection('database', 'users', array('name' => 'miles'));
  * ```
  *
  * @param       $database
  * @param       $collection
  * @param array $criteria
  */
 public function seeInDatabaseCollection($database, $collection, $criteria = array())
 {
     $this->checkDatabase($database);
     $collection = $this->drivers[$database]->getDbh()->selectCollection($collection);
     $res = $collection->count($criteria);
     \PHPUnit_Framework_Assert::assertGreaterThan(0, $res);
 }
开发者ID:grzegorzkurtyka,项目名称:codeception-multimongodb,代码行数:19,代码来源:MultiMongoDb.php


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