PHPUnit_Framework_Assert::assertLessThan PHP Method

assertLessThan() public static method

Asserts that a value is smaller than another value.
public static assertLessThan ( mixed $expected, mixed $actual, string $message = '' )
$expected mixed
$actual mixed
$message string
    public static function assertLessThan($expected, $actual, $message = '')
    {
        static::assertThat($actual, static::lessThan($expected), $message);
    }

Usage Example

Esempio n. 1
0
 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;
 }
All Usage Examples Of PHPUnit_Framework_Assert::assertLessThan
PHPUnit_Framework_Assert