You are here

public static function PHPUnit_Framework_Constraint_Not::negate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/Not.php \PHPUnit_Framework_Constraint_Not::negate()

Parameters

string $string:

Return value

string

2 calls to PHPUnit_Framework_Constraint_Not::negate()
PHPUnit_Framework_Constraint_Not::failureDescription in vendor/phpunit/phpunit/src/Framework/Constraint/Not.php
Returns the description of the failure
PHPUnit_Framework_Constraint_Not::toString in vendor/phpunit/phpunit/src/Framework/Constraint/Not.php
Returns a string representation of the constraint.

File

vendor/phpunit/phpunit/src/Framework/Constraint/Not.php, line 41

Class

PHPUnit_Framework_Constraint_Not
Logical NOT.

Code

public static function negate($string) {
  return str_replace(array(
    'contains ',
    'exists',
    'has ',
    'is ',
    'are ',
    'matches ',
    'starts with ',
    'ends with ',
    'reference ',
    'not not ',
  ), array(
    'does not contain ',
    'does not exist',
    'does not have ',
    'is not ',
    'are not ',
    'does not match ',
    'starts not with ',
    'ends not with ',
    'don\'t reference ',
    'not ',
  ), $string);
}