Removes uneeded filters from code base
This commit is contained in:
@@ -40,11 +40,7 @@ class Bootstrap
|
|||||||
$configuration = Setup::createAnnotationMetadataConfiguration([__DIR__ . '/Models'], true);
|
$configuration = Setup::createAnnotationMetadataConfiguration([__DIR__ . '/Models'], true);
|
||||||
$configuration->setQuoteStrategy(new AnsiQuoteStrategy());
|
$configuration->setQuoteStrategy(new AnsiQuoteStrategy());
|
||||||
|
|
||||||
$configuration->addFilter("soft-deleteable", 'Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter');
|
|
||||||
|
|
||||||
$entityManager = EntityManager::create(["pdo" => $pdo], $configuration);
|
$entityManager = EntityManager::create(["pdo" => $pdo], $configuration);
|
||||||
$entityManager->getFilters()->enable("soft-deleteable");
|
|
||||||
$entityManager->getEventManager()->addEventSubscriber(new \Gedmo\SoftDeleteable\SoftDeleteableListener());
|
|
||||||
|
|
||||||
// Create Schema
|
// Create Schema
|
||||||
$metaData = $entityManager->getMetadataFactory()->getAllMetadata();
|
$metaData = $entityManager->getMetadataFactory()->getAllMetadata();
|
||||||
|
|||||||
@@ -35,11 +35,7 @@ abstract class ModelTestCase extends \PHPUnit_Extensions_Database_TestCase
|
|||||||
$configuration = Setup::createAnnotationMetadataConfiguration(["src/Models"], true);
|
$configuration = Setup::createAnnotationMetadataConfiguration(["src/Models"], true);
|
||||||
$configuration->setQuoteStrategy(new AnsiQuoteStrategy());
|
$configuration->setQuoteStrategy(new AnsiQuoteStrategy());
|
||||||
|
|
||||||
$configuration->addFilter("soft-deleteable", 'Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter');
|
|
||||||
|
|
||||||
self::$em = EntityManager::create(["pdo" => self::$pdo], $configuration);
|
self::$em = EntityManager::create(["pdo" => self::$pdo], $configuration);
|
||||||
self::$em->getFilters()->enable("soft-deleteable");
|
|
||||||
self::$em->getEventManager()->addEventSubscriber(new \Gedmo\SoftDeleteable\SoftDeleteableListener());
|
|
||||||
|
|
||||||
// Create Schema
|
// Create Schema
|
||||||
$metaData = self::$em->getMetadataFactory()->getAllMetadata();
|
$metaData = self::$em->getMetadataFactory()->getAllMetadata();
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ class CharacterModelTest extends ModelTestCase
|
|||||||
->getRepository(Character::class)
|
->getRepository(Character::class)
|
||||||
->findAll(CharacterRepository::INCLUDE_SOFTDELETED);
|
->findAll(CharacterRepository::INCLUDE_SOFTDELETED);
|
||||||
$this->assertSame(3, count($allChars));
|
$this->assertSame(3, count($allChars));
|
||||||
|
|
||||||
$this->getEntityManager()->getFilters()->enable("soft-deleteable");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user