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


PHP PHPUnit_Framework_Assert::assertLessThan方法代码示例

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


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

示例1: optimizedFileIsSmallerThanPercent

 public function optimizedFileIsSmallerThanPercent($percent)
 {
     $originalFilesize = filesize($this->originalImage);
     $actualPercent = filesize($this->optimizedImage) / $originalFilesize * 100;
     \PHPUnit_Framework_Assert::assertLessThan($percent, $actualPercent, 'compression level is too small');
     return $this;
 }
开发者ID:lidoma,项目名称:image-optimizer,代码行数:7,代码来源:ImageAssertion.php

示例2: toBeGreaterThanOrEqualTo

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

示例3: assertLessThan

/**
 * Asserts that a value is smaller than another value.
 *
 * @param  mixed   $expected
 * @param  mixed   $actual
 * @param  string  $message
 * @since  Method available since Release 3.1.0
 */
function assertLessThan($expected, $actual, $message = '')
{
    return PHPUnit_Framework_Assert::assertLessThan($expected, $actual, $message);
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:12,代码来源:Functions.php

示例4: dontSeeInDatabaseCollection

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

示例5: dontSeeInCollection

 /**
  * Checks if collection doesn't contain an item.
  *
  * ``` php
  * <?php
  * $I->dontSeeInCollection('users', array('name' => 'miles'));
  * ```
  *
  * @param $collection
  * @param array $criteria
  */
 public function dontSeeInCollection($collection, $criteria = array())
 {
     $collection = $this->driver->getDbh()->selectCollection($collection);
     $res = $collection->count($criteria);
     \PHPUnit_Framework_Assert::assertLessThan(1, $res);
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:17,代码来源:MongoDb.php

示例6: dontSeeInDatabase

 public function dontSeeInDatabase($table, $criteria = [])
 {
     $res = $this->proceedSeeInDatabase($table, "count(*)", $criteria);
     \PHPUnit_Framework_Assert::assertLessThan(1, $res);
 }
开发者ID:foxman209,项目名称:Codeception,代码行数:5,代码来源:Dbh.php

示例7: lessThan

 public function lessThan($expected)
 {
     a::assertLessThan($expected, $this->actual, $this->description);
 }
开发者ID:jaschweder,项目名称:Verify,代码行数:4,代码来源:Verify.php

示例8: toBeLessThan

 /**
  * Expect that a value is smaller than another value.
  *
  * @param mixed $expected
  * @param string $message
  *
  * @return Expect
  */
 public function toBeLessThan($expected, $message = '')
 {
     Assert::assertLessThan($expected, $this->value, $message);
     return $this;
 }
开发者ID:jpkleemans,项目名称:phpunit-expect,代码行数:13,代码来源:Expect.php

示例9: toBeLessThan

 public function toBeLessThan($expected)
 {
     \PHPUnit_Framework_Assert::assertLessThan($expected, $this->actual);
 }
开发者ID:danrspencer,项目名称:phpunit-expect-syntax,代码行数:4,代码来源:Expector.php

示例10: isLessThan

 public function isLessThan($expected)
 {
     Assert::assertLessThan($expected, $this->actual, $this->description);
     return $this;
 }
开发者ID:dekeysoft,项目名称:pu-tester,代码行数:5,代码来源:ValueMatcher.php

示例11: elAlquilerDeLaTaquillaHaCaducado

 /**
  * @When /^el alquiler de la taquilla "([^"]*)" ha caducado$/
  */
 public function elAlquilerDeLaTaquillaHaCaducado($code)
 {
     /** @var Locker $locker */
     $locker = $this->getRepository('locker')->findOneBy(['code' => $code]);
     if (!$locker) {
         throw new \Exception('Locker not found: ' . $code);
     }
     /** @var Rental $rental */
     $rental = $this->getRepository('rental')->getCurrentRental($locker);
     $now = new \DateTime('now');
     \PHPUnit_Framework_Assert::assertLessThan($now, $rental->getEndAt());
 }
开发者ID:aulasoftwarelibre,项目名称:seta,代码行数:15,代码来源:RentalContext.php

示例12: responseFieldValueIsLessThan

 /**
  * @Then response :field is less than :value
  */
 public function responseFieldValueIsLessThan($field, $value)
 {
     Assert::assertLessThan($value, $this->getResponseField($field));
 }
开发者ID:ingresse,项目名称:behat-api-extension,代码行数:7,代码来源:AssertContextTrait.php


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