Initial commit

This commit is contained in:
2025-10-05 13:55:28 +02:00
commit 68d521677a
767 changed files with 46947 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Tests\Behat\Hook;
use Behat\Behat\Context\Context;
use Behat\Hook\BeforeScenario;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\ORM\EntityManagerInterface;
final readonly class DatabasePurger implements Context
{
public function __construct(
private EntityManagerInterface $entityManager
) {
}
#[BeforeScenario]
public function purge(): void
{
$this->entityManager->getConnection()
->getConfiguration()
->setMiddlewares([]);
$purger = new ORMPurger($this->entityManager);
$purger->purge();
$this->entityManager->clear();
}
}