public static function assertTypeError($function) { if (PHP_VERSION_ID < 70000) { Assert::error($function, E_RECOVERABLE_ERROR); } else { Assert::exception($function, '\\TypeError'); } }
/** * Checks that the function generate PHP error and does not throw exception. * @param callable $function * @param string $expectedType * @param null|string $expectedMessage * @return void */ public function error($function, $expectedType, $expectedMessage = NULL) { Assert::error($function, $expectedType, $expectedMessage = NULL); }