Skip to content

Commit bb81f79

Browse files
authored
More explicit assert failure description (#84)
1 parent 1c89490 commit bb81f79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/symfony/tests/JobAssert.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ final class JobAssert
1111
{
1212
public static function assertIsSuccessful(JobExecution $execution): void
1313
{
14-
Assert::assertTrue($execution->getStatus()->isSuccessful());
14+
Assert::assertTrue(
15+
$execution->getStatus()->isSuccessful(),
16+
'Failed asserting the job succeed. Failure:' . PHP_EOL . ($execution->getAllFailures()[0] ?? null),
17+
);
1518
}
1619

1720
public static function assertItemJobStats(

0 commit comments

Comments
 (0)