public function Framework_ConstraintTest::testConstraintCallbackFailure

@covers PHPUnit_Framework_Constraint_Callback @expectedException PHPUnit_Framework_ExpectationFailedException @expectedExceptionMessage Failed asserting that 'This fails' is accepted by specified callback.

File

drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php, line 1847

Class

Framework_ConstraintTest
@package PHPUnit @author Sebastian Bergmann <sebastian@phpunit.de> @author Bernhard Schussek <bschussek@2bepublished.at> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license …

Code

public function testConstraintCallbackFailure() {
  $constraint = PHPUnit_Framework_Assert::callback(function () {
    return FALSE;
  });
  $constraint
    ->evaluate('This fails');
}