Skip to content

Commit

Permalink
Allow data-fixtures v2
Browse files Browse the repository at this point in the history
The interfaces introduced in 1.5.0 allow to test without
mocking a final class.
  • Loading branch information
greg0ire committed Nov 13, 2024
1 parent b80a5a3 commit d7ec426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"require": {
"php": "^7.4 || ^8.0",
"doctrine/data-fixtures": "^1.3",
"doctrine/data-fixtures": "^1.5|^2.0",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/orm": "^2.14.0 || ^3.0",
"doctrine/persistence": "^2.4|^3.0",
Expand Down
10 changes: 5 additions & 5 deletions tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Doctrine\Bundle\FixturesBundle\Tests\Fixtures\FooBundle\DataFixtures\RequiredConstructorArgsFixtures;
use Doctrine\Bundle\FixturesBundle\Tests\Fixtures\FooBundle\DataFixtures\WithDeepDependenciesFixtures;
use Doctrine\Bundle\FixturesBundle\Tests\Fixtures\FooBundle\DataFixtures\WithDependenciesFixtures;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\Common\DataFixtures\Purger\ORMPurgerInterface;
use Doctrine\Common\EventManager;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\EntityManagerInterface;
Expand Down Expand Up @@ -304,7 +304,7 @@ public function testRunCommandWithDefaultPurger(): void
$container->set('doctrine', $registry);

$purgerFactory = $this->createMock(PurgerFactory::class);
$purger = $this->createMock(ORMPurger::class);
$purger = $this->createMock(ORMPurgerInterface::class);
$purgerFactory
->expects(self::once())
->method('createForEntityManager')
Expand Down Expand Up @@ -351,7 +351,7 @@ public function testRunCommandWithPurgeExclusions(): void
$container->set('doctrine', $registry);

$purgerFactory = $this->createMock(PurgerFactory::class);
$purger = $this->createMock(ORMPurger::class);
$purger = $this->createMock(ORMPurgerInterface::class);
$purgerFactory
->expects(self::once())
->method('createForEntityManager')
Expand Down Expand Up @@ -401,7 +401,7 @@ public function testRunCommandWithCustomPurgerAndCustomEntityManager(): void
$container->set('doctrine', $registry);

$purgerFactory = $this->createMock(PurgerFactory::class);
$purger = $this->createMock(ORMPurger::class);
$purger = $this->createMock(ORMPurgerInterface::class);
$purgerFactory
->expects(self::once())
->method('createForEntityManager')
Expand Down Expand Up @@ -448,7 +448,7 @@ public function testRunCommandWithPurgeMode(): void
$container->set('doctrine', $registry);

$purgerFactory = $this->createMock(PurgerFactory::class);
$purger = $this->createMock(ORMPurger::class);
$purger = $this->createMock(ORMPurgerInterface::class);
$purgerFactory
->expects(self::once())
->method('createForEntityManager')
Expand Down

0 comments on commit d7ec426

Please sign in to comment.