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 greater
15 * @since Class available since Release 3.0.0
17 class PHPUnit_Framework_Constraint_GreaterThan extends PHPUnit_Framework_Constraint
25 * @param numeric $value
27 public function __construct($value)
29 parent::__construct();
30 $this->value = $value;
34 * Evaluates the constraint for parameter $other. Returns true if the
35 * constraint is met, false otherwise.
37 * @param mixed $other Value or object to evaluate.
41 protected function matches($other)
43 return $this->value < $other;
47 * Returns a string representation of the constraint.
51 public function toString()
53 return 'is greater than ' . $this->exporter->export($this->value);