public function setUp()
 {
     parent::setUp();
     $yamlDriver = new YamlDriver(__DIR__ . '/Driver/Yaml');
     $this->referenceIntegrity = new ReferenceIntegrityListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->referenceIntegrity);
     $this->dm = $this->getMockDocumentManager('gedmo_extensions_test', $yamlDriver);
 }
 public function setUp()
 {
     parent::setUp();
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $this->tree = new TreeListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->tree);
     $this->em = $this->getMockSqliteEntityManager(array('Mapping\\Fixture\\Xml\\NestedTree'), $chain);
 }
 public function setUp()
 {
     if (!class_exists('Doctrine\\ODM\\MongoDB\\Mapping\\Driver\\YamlDriver')) {
         $this->markTestSkipped('The Mongo ODM is not installed');
     }
     parent::setUp();
     $yamlDriver = new YamlDriver(__DIR__ . '/Driver/Yaml');
     $this->referenceIntegrity = new ReferenceIntegrityListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->referenceIntegrity);
     $this->dm = $this->getMockDocumentManager('gedmo_extensions_test', $yamlDriver);
 }
 public function setUp()
 {
     parent::setUp();
     $reader = new AnnotationReader();
     $annotationDriver = new AnnotationDriver($reader);
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $chain->addDriver($annotationDriver, 'Mapping\\Fixture');
     $this->sortable = new SortableListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->sortable);
     $this->em = $this->getMockSqliteEntityManager(array('Mapping\\Fixture\\Xml\\Sortable', 'Mapping\\Fixture\\SortableGroup'), $chain);
 }
 public function setUp()
 {
     parent::setUp();
     $reader = new AnnotationReader();
     $annotationDriver = new AnnotationDriver($reader);
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($annotationDriver, 'Gedmo\\Loggable');
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $this->loggable = new LoggableListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->loggable);
     $this->em = $this->getMockSqliteEntityManager(array('Gedmo\\Loggable\\Entity\\LogEntry', 'Mapping\\Fixture\\Xml\\Loggable', 'Mapping\\Fixture\\Xml\\LoggableWithEmbedded', 'Mapping\\Fixture\\Xml\\Embedded', 'Mapping\\Fixture\\Xml\\Status'), $chain);
 }
 protected function setUp()
 {
     parent::setUp();
     if (!class_exists('Mongo')) {
         $this->markTestSkipped('Missing Mongo extension.');
     }
     $reader = new AnnotationReader();
     $this->dm = $this->getMockDocumentManager('test', new MongoDBAnnotationDriver($reader, __DIR__ . '/Fixture/ODM/MongoDB'));
     $listener = new ReferencesListener(array('document' => $this->dm));
     $this->evm->addEventSubscriber($listener);
     $reader = new AnnotationReader();
     $this->em = $this->getMockSqliteEntityManager(array('References\\Fixture\\ORM\\StockItem', 'References\\Fixture\\ORM\\Category'), new ORMAnnotationDriver($reader, __DIR__ . '/Fixture/ORM'));
     $listener->registerManager('entity', $this->em);
 }
 public function setUp()
 {
     parent::setUp();
     Validator::$enableMimeTypesConfigException = false;
     $reader = new AnnotationReader();
     $annotationDriver = new AnnotationDriver($reader);
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $chain->addDriver($annotationDriver, 'Mapping\\Fixture');
     $this->listener = new UploadableListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->listener);
     $this->em = $this->getMockSqliteEntityManager(array('Mapping\\Fixture\\Xml\\Uploadable'), $chain);
 }
 public function setUp()
 {
     parent::setUp();
     $reader = new AnnotationReader();
     $annotationDriver = new AnnotationDriver($reader);
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $chain->addDriver($annotationDriver, 'Mapping\\Fixture');
     $chain->addDriver($annotationDriver, 'Gedmo\\Tree');
     $this->tree = new TreeListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->tree);
     $this->em = $this->getMockSqliteEntityManager(array('Mapping\\Fixture\\Xml\\MaterializedPathTree'), $chain);
 }
 public function setUp()
 {
     parent::setUp();
     $reader = new AnnotationReader();
     $reader->setDefaultAnnotationNamespace('Doctrine\\ORM\\Mapping\\');
     $annotationDriver = new AnnotationDriver($reader);
     $xmlDriver = new XmlDriver(__DIR__ . '/../Driver/Xml');
     $chain = new DriverChain();
     $chain->addDriver($annotationDriver, 'Gedmo\\Translatable');
     $chain->addDriver($xmlDriver, 'Mapping\\Fixture\\Xml');
     $this->translatable = new TranslationListener();
     $this->evm = new EventManager();
     $this->evm->addEventSubscriber($this->translatable);
     $this->em = $this->getMockSqliteEntityManager(array('Gedmo\\Translatable\\Entity\\Translation', 'Mapping\\Fixture\\Xml\\Translatable'), $chain);
 }
 public function setUp()
 {
     parent::setUp();
     // EM with standard annotation mapping
     $this->em1 = $this->getMockSqliteEntityManager(array('Sluggable\\Fixture\\Article'));
     // EM with yaml and annotation mapping
     $reader = new AnnotationReader();
     $annotationDriver = new AnnotationDriver($reader);
     $reader = new AnnotationReader();
     $annotationDriver2 = new AnnotationDriver($reader);
     $yamlDriver = new YamlDriver(__DIR__ . '/Driver/Yaml');
     $chain = new DriverChain();
     $chain->addDriver($annotationDriver, 'Translatable\\Fixture');
     $chain->addDriver($yamlDriver, 'Mapping\\Fixture\\Yaml');
     $chain->addDriver($annotationDriver2, 'Gedmo\\Translatable');
     $this->em2 = $this->getMockSqliteEntityManager(array('Translatable\\Fixture\\PersonTranslation', 'Mapping\\Fixture\\Yaml\\User'), $chain);
     // DM with standard annotation mapping
     $this->dm1 = $this->getMockDocumentManager('gedmo_extensions_test');
 }