public static function PHPUnit_Framework_Assert::callback

Returns a PHPUnit_Framework_Constraint_Callback matcher object.

Parameters

callable $callback:

Return value

PHPUnit_Framework_Constraint_Callback

7 calls to PHPUnit_Framework_Assert::callback()
Framework_ConstraintTest::testConstraintCallback in drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php
@covers PHPUnit_Framework_Constraint_Callback
Framework_ConstraintTest::testConstraintCallbackFailure in drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php
@covers PHPUnit_Framework_Constraint_Callback @expectedException PHPUnit_Framework_ExpectationFailedException @expectedExceptionMessage Failed asserting that 'This fails' is accepted by specified callback.
Framework_ConstraintTest::testConstraintCallbackInvalidArrayArgumentWithBadArray in drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php
@covers PHPUnit_Framework_Constraint_Callback @expectedException InvalidArgumentException @expectedExceptionMessage Specified callback <array without indexes 0 and 1 set> is not callable.
Framework_ConstraintTest::testConstraintCallbackInvalidArrayArgumentWithClassname in drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php
@covers PHPUnit_Framework_Constraint_Callback @expectedException InvalidArgumentException @expectedExceptionMessage Specified callback <Framework_ConstraintTest::invalid callback> is not callable.
Framework_ConstraintTest::testConstraintCallbackInvalidArrayArgumentWithEmptyArray in drupal/core/vendor/phpunit/phpunit/Tests/Framework/ConstraintTest.php
@covers PHPUnit_Framework_Constraint_Callback @expectedException InvalidArgumentException @expectedExceptionMessage Specified callback <empty array> is not callable.

... See full list

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php, line 2381

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function callback($callback) {
  return new PHPUnit_Framework_Constraint_Callback($callback);
}