Skip to content

PHPUnit's process isolation doesn't work due to Laravel's application bootstrapping #49237

Closed
@l-alexandrov

Description

@l-alexandrov

Laravel Version

10.34.2

PHP Version

8.3.0

Database Driver & Version

MariaDB 10.4.32

Description

PHPUnit's process isolation feature doesn't work starting from PHPUnit 10.2.0 on Laravel.

Tried to run a minimal test case with process isolation, extending the plain PHPUnit's PHPUnit\Framework\TestCase class and it runs fine.

But, when I try to run it over the Laravel's Testing platform it fails with error Test was run in child process and ended unexpectedly


Related sebastianbergmann/phpunit#5595

Steps To Reproduce

  1. Create a minimal test case with process isolation, extending the Laravel's TestCase class:
<?php

declare(strict_types=1);

namespace Tests\Unit\Casts;


use Tests\TestCase;

class MyTestCase extends TestCase
{
    /**
     * @test
     * @runInSeparateProcess
     */
    public function it_is_true(): void
    {
        $this->assertTrue(true);
    }

}
  1. See the error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions