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 */
14class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
15{
16    /**
17     * Evaluates the constraint for parameter $other. Returns true if the
18     * constraint is met, false otherwise.
19     *
20     * @param mixed $other Value or object to evaluate.
21     *
22     * @return bool
23     */
24    protected function matches($other)
25    {
26        return $other === false;
27    }
28
29    /**
30     * Returns a string representation of the constraint.
31     *
32     * @return string
33     */
34    public function toString()
35    {
36        return 'is false';
37    }
38}
39