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 accepts any input value.
14 * @since Class available since Release 3.0.0
16 class PHPUnit_Framework_Constraint_IsAnything extends PHPUnit_Framework_Constraint
19 * Evaluates the constraint for parameter $other
21 * If $returnResult is set to false (the default), an exception is thrown
22 * in case of a failure. null is returned otherwise.
24 * If $returnResult is true, the result of the evaluation is returned as
25 * a boolean value instead: true in case of success, false in case of a
28 * @param mixed $other Value or object to evaluate.
29 * @param string $description Additional information about the test
30 * @param bool $returnResult Whether to return a result or throw an exception
34 * @throws PHPUnit_Framework_ExpectationFailedException
36 public function evaluate($other, $description = '', $returnResult = false)
38 return $returnResult ? true : null;
42 * Returns a string representation of the constraint.
46 public function toString()
52 * Counts the number of constraint elements.
56 * @since Method available since Release 3.5.0
58 public function count()