mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
More phpstan checks for better code
This commit is contained in:
@@ -41,8 +41,12 @@ final class PregSplitTest extends TestCase
|
||||
public function testPregSplitThrowsOnError(): void
|
||||
{
|
||||
//We need to disable the error handler for phpunit... because we expect some errors here
|
||||
$this->errorHandler = set_error_handler(static function (): void {
|
||||
}, E_WARNING);
|
||||
$this->errorHandler = set_error_handler(
|
||||
static function (int $i, string $s, string $s2, int $x, ?array $trace = null): bool {
|
||||
return true;
|
||||
},
|
||||
E_WARNING
|
||||
);
|
||||
|
||||
$this->expectException(PcreException::class);
|
||||
Utils::pregSplit('~InvalidRegular)Expression~', 'some word');
|
||||
|
||||
Reference in New Issue
Block a user