Skip to content

Commit 419c814

Browse files
committed
[Temp] Determine the exception class, hopefully
1 parent 3e270e9 commit 419c814

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

tests/Unit/PhpStan/IgnoreBooleanAlwaysImpossibleAssertTest.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ public function warningIsRetainedForPointlessAssert(): void
3939
self::markTestSkipped('This is testing the testers, and only needs to run whenever possible.');
4040
}
4141

42-
// Second argument is array of expected warnings.
43-
$this->analyse(
44-
[self::FIXTURES_DIR . 'alwaystrue-pointlessassert.php'],
45-
[
42+
try {
43+
// Second argument is array of expected warnings.
44+
$this->analyse(
45+
[self::FIXTURES_DIR . 'alwaystrue-pointlessassert.php'],
4646
[
47-
'Call to function is_int() with int will always evaluate to true.',
48-
7,
49-
],
50-
]
51-
);
47+
[
48+
'Call to function is_int() with int will always evaluate to true.',
49+
7,
50+
],
51+
]
52+
);
53+
} catch (\Throwable $e) {
54+
self::fail(\get_class($e) . ' was thrown');
55+
}
5256
}
5357
}

0 commit comments

Comments
 (0)