public function PHPUnit_Framework_Constraint_Callback::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php \PHPUnit_Framework_Constraint_Callback::__construct()
Parameters
callable $callback:
Throws
Overrides PHPUnit_Framework_Constraint::__construct
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ Callback.php, line 22
Class
- PHPUnit_Framework_Constraint_Callback
- Constraint that evaluates against a specified closure.
Code
public function __construct($callback) {
if (!is_callable($callback)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'callable');
}
parent::__construct();
$this->callback = $callback;
}