3
* This file is part of PHPUnit.
5
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
12
* Constraint that asserts that the value it is evaluated for is less than
16
* @subpackage Framework_Constraint
17
* @author Sebastian Bergmann <sebastian@phpunit.de>
18
* @author Bernhard Schussek <bschussek@2bepublished.at>
19
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
20
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
21
* @link http://www.phpunit.de/
22
* @since Class available since Release 3.0.0
24
class PHPUnit_Framework_Constraint_LessThan extends PHPUnit_Framework_Constraint
32
* @param numeric $value
34
public function __construct($value)
36
parent::__construct();
37
$this->value = $value;
41
* Evaluates the constraint for parameter $other. Returns true if the
42
* constraint is met, false otherwise.
44
* @param mixed $other Value or object to evaluate.
47
protected function matches($other)
49
return $this->value > $other;
53
* Returns a string representation of the constraint.
57
public function toString()
59
return 'is less than ' . $this->exporter->export($this->value);