Skip to content

Commit

Permalink
PHPUnit: set “processIsolation="true"” in conf instead of each test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexislefebvre committed Nov 5, 2023
1 parent ba46c6f commit 402ed42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
beStrictAboutOutputDuringTests="true"
executionOrder="random"
resolveDependencies="true"
processIsolation="true"
>

<php>
Expand Down
5 changes: 3 additions & 2 deletions tests/Test/ConfigSqliteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class_alias('\Doctrine\Persistence\ObjectManager', '\Doctrine\Common\Persistence
use Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool;
use Liip\TestFixturesBundle\Services\DatabaseTools\ORMSqliteDatabaseTool;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use function count;

/**
* @runTestsInSeparateProcesses
Expand Down Expand Up @@ -370,7 +371,7 @@ public function testLoadFixturesFilesWithPurgeModeTruncate(): void
// There are 10 users in the database
$this->assertSame(
10,
\count($users)
count($users)
);

$this->databaseTool->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE);
Expand All @@ -393,7 +394,7 @@ public function testLoadFixturesFilesWithPurgeModeTruncate(): void
// There are only 10 users in the database
$this->assertSame(
10,
\count($users)
count($users)
);

// Auto-increment hasn't been altered, so ids start from 11
Expand Down

0 comments on commit 402ed42

Please sign in to comment.