public function PHPUnit_Framework_Constraint_IsType::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php \PHPUnit_Framework_Constraint_IsType::__construct()
Parameters
string $type:
Throws
Overrides PHPUnit_Framework_Constraint::__construct
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ IsType.php, line 63
Class
- PHPUnit_Framework_Constraint_IsType
- Constraint that asserts that the value it is evaluated for is of a specified type.
Code
public function __construct($type) {
parent::__construct();
if (!isset($this->types[$type])) {
throw new PHPUnit_Framework_Exception(sprintf('Type specified for PHPUnit_Framework_Constraint_IsType <%s> ' . 'is not a valid type.', $type));
}
$this->type = $type;
}