d476b0975fae0975b6c04f167f247e083f785826
[yaffs-website] / vendor / phpunit / phpunit / src / Framework / Constraint / IsFalse.php
1 <?php
2 /*
3  * This file is part of PHPUnit.
4  *
5  * (c) Sebastian Bergmann <sebastian@phpunit.de>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Constraint that accepts false.
13  *
14  * @since Class available since Release 3.3.0
15  */
16 class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
17 {
18     /**
19      * Evaluates the constraint for parameter $other. Returns true if the
20      * constraint is met, false otherwise.
21      *
22      * @param mixed $other Value or object to evaluate.
23      *
24      * @return bool
25      */
26     protected function matches($other)
27     {
28         return $other === false;
29     }
30
31     /**
32      * Returns a string representation of the constraint.
33      *
34      * @return string
35      */
36     public function toString()
37     {
38         return 'is false';
39     }
40 }