You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running with --process-isolation does not show the proper outcome of a failed test when the trace involves a closure, it displays the message "Test was run in child process and ended unexpectedly".
Current behavior
As above.
How to reproduce
Run the following:
<?php
namespace App\Tests;
use PHPUnit\Framework\TestCase;
class ExampleTest extends TestCase
{
public static function assertClosureReturnsValue(\Closure $closure, mixed $value): void
{
static::assertEquals($value, $closure());
}
public function testExample(): void
{
static::assertClosureReturnsValue(fn () => 1, 2);
}
}
with phpunit --filter=ExampleTest --process-isolation
and see the outcome:
Expected behavior
It should produce the same outcome as running without --process-isolation:
The text was updated successfully, but these errors were encountered:
Summary
Running with --process-isolation does not show the proper outcome of a failed test when the trace involves a closure, it displays the message "Test was run in child process and ended unexpectedly".
Current behavior
As above.
How to reproduce
Run the following:
with
phpunit --filter=ExampleTest --process-isolation
and see the outcome:
Expected behavior
It should produce the same outcome as running without --process-isolation:
The text was updated successfully, but these errors were encountered: