You are here

public function Framework_ConstraintTest::testConstraintCallbackFailure in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php \Framework_ConstraintTest::testConstraintCallbackFailure()

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

File

vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php, line 1775

Class

Framework_ConstraintTest
@since Class available since Release 3.0.0

Code

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