~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 * @package    PHPUnit
 
15
 * @subpackage Framework_Constraint
 
16
 * @author     Sebastian Bergmann <sebastian@phpunit.de>
 
17
 * @author     Bernhard Schussek <bschussek@2bepublished.at>
 
18
 * @copyright  Sebastian Bergmann <sebastian@phpunit.de>
 
19
 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
 
20
 * @link       http://www.phpunit.de/
 
21
 * @since      Class available since Release 3.3.0
 
22
 */
 
23
class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
 
24
{
 
25
    /**
 
26
     * Evaluates the constraint for parameter $other. Returns true if the
 
27
     * constraint is met, false otherwise.
 
28
     *
 
29
     * @param  mixed $other Value or object to evaluate.
 
30
     * @return bool
 
31
     */
 
32
    protected function matches($other)
 
33
    {
 
34
        return $other === false;
 
35
    }
 
36
 
 
37
    /**
 
38
     * Returns a string representation of the constraint.
 
39
     *
 
40
     * @return string
 
41
     */
 
42
    public function toString()
 
43
    {
 
44
        return 'is false';
 
45
    }
 
46
}