Skip to content

Commit

Permalink
Mock the ORMPurgerInterface instead of the final ORMPurger
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Mar 12, 2024
1 parent 4e46a27 commit 6ad4605
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Purger/ORMPurger.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Class responsible for purging databases of data before reloading data fixtures.
*/
final class ORMPurger implements PurgerInterface, ORMPurgerInterface
final class ORMPurger implements ORMPurgerInterface
{
public const PURGE_MODE_DELETE = 1;
public const PURGE_MODE_TRUNCATE = 2;
Expand Down
8 changes: 4 additions & 4 deletions tests/Common/DataFixtures/Executor/ORMExecutorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Doctrine\Common\DataFixtures\Executor\MultipleTransactionORMExecutor;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\Common\DataFixtures\Purger\ORMPurgerInterface;
use Doctrine\Common\EventManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Tests\Common\DataFixtures\BaseTestCase;
Expand Down Expand Up @@ -135,9 +135,9 @@ private function getMockFixture(): FixtureInterface
return $this->createMock(FixtureInterface::class);
}

/** @return ORMPurger&MockObject */
private function getMockPurger(): ORMPurger
/** @return ORMPurgerInterface&MockObject */
private function getMockPurger(): ORMPurgerInterface
{
return $this->createMock(ORMPurger::class);
return $this->createMock(ORMPurgerInterface::class);
}
}

0 comments on commit 6ad4605

Please sign in to comment.