예제 #1
0
 protected function setUp()
 {
     $metadataDriver = new AnnotationDriver(new AnnotationReader(), 'OroCRM\\Bundle\\TaskBundle\\Tests\\Unit\\Fixtures\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['OroCRMTaskBundle' => 'OroCRM\\Bundle\\TaskBundle\\Tests\\Unit\\Fixtures\\Entity']);
 }
 protected function setUp()
 {
     $metadataDriver = new AnnotationDriver(new AnnotationReader(), 'Oro\\Bundle\\CalendarBundle\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['OroCalendarBundle' => 'Oro\\Bundle\\CalendarBundle\\Entity']);
 }
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\BatchBundle\\Tests\\Unit\\ORM\\Query\\Stub');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(array('Stub' => 'Oro\\Bundle\\BatchBundle\\Tests\\Unit\\ORM\\Query\\Stub'));
 }
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, ['Oro\\Bundle\\ImapBundle\\Entity', 'Oro\\Bundle\\EmailBundle\\Entity']);
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['OroImapBundle' => 'Oro\\Bundle\\ImapBundle\\Entity']);
 }
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\OrganizationBundle\\Tests\\Unit\\Ownership\\Fixture\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Stub' => 'Oro\\Bundle\\OrganizationBundle\\Tests\\Unit\\Ownership\\Fixture\\Entity']);
 }
예제 #6
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\SecurityBundle\\Tests\\Unit\\Fixtures\\Models\\CMS');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Test' => 'Oro\\Bundle\\SecurityBundle\\Tests\\Unit\\Fixtures\\Models\\CMS']);
 }
예제 #7
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\ReminderBundle\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(array('OroReminderBundle' => 'Oro\\Bundle\\ReminderBundle\\Entity'));
 }
예제 #8
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\DataAuditBundle\\Tests\\Unit\\Fixture');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setEntityNamespaces(array('OroUserBundle' => 'Oro\\Bundle\\UserBundle\\Entity', 'OroDataAuditBundle' => 'Oro\\Bundle\\DataAuditBundle\\Entity'));
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->loggableAnnotationDriver = new \Oro\Bundle\DataAuditBundle\Metadata\Driver\AnnotationDriver(new AnnotationReader());
 }
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\FilterBundle\\Tests\\Unit\\Datasource\\Orm\\Fixtures\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Stub' => 'Oro\\Bundle\\FilterBundle\\Tests\\Unit\\Datasource\\Orm\\Fixtures\\Entity']);
     $doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $doctrine->expects($this->any())->method('getManagerForClass')->will($this->returnValue($this->em));
     $this->paramIndex = 0;
     $this->builder = new OrmManyRelationBuilder($doctrine);
 }
예제 #10
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\SoapBundle\\Tests\\Unit\\Serializer\\Fixtures\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Test' => 'Oro\\Bundle\\SoapBundle\\Tests\\Unit\\Serializer\\Fixtures\\Entity']);
     $doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $doctrine->expects($this->any())->method('getManagerForClass')->will($this->returnValue($this->em));
     $doctrine->expects($this->any())->method('getAliasNamespace')->will($this->returnValueMap([['Test', 'Oro\\Bundle\\SoapBundle\\Tests\\Unit\\Serializer\\Fixtures\\Entity']]));
     $this->configManager = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $this->container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->serializer = new EntitySerializer($doctrine, $this->configManager, new EntityDataAccessor(), new EntityDataTransformer($this->container));
 }
예제 #11
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\EntityExtendBundle\\Tests\\Unit\\Filter\\Fixtures');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Stub' => 'Oro\\Bundle\\EntityExtendBundle\\Tests\\Unit\\Filter\\Fixtures']);
     $this->formFactory = $this->getMock('Symfony\\Component\\Form\\FormFactoryInterface');
     $doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $doctrine->expects($this->any())->method('getManagerForClass')->will($this->returnValue($this->em));
     $manyRelationBuilder = new ManyRelationBuilder();
     $manyRelationBuilder->addBuilder(new OrmManyRelationBuilder($doctrine));
     $this->filter = new DictionaryFilter($this->formFactory, new FilterUtility(), $manyRelationBuilder);
 }
예제 #12
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\EntityExtendBundle\\Tests\\Unit\\Fixtures\\Associations');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Test' => 'Oro\\Bundle\\EntityExtendBundle\\Tests\\Unit\\Fixtures\\Associations']);
     $this->configManager = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $this->eventDispatcher = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcher')->disableOriginalConstructor()->getMock();
     $doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $doctrine->expects($this->any())->method('getManagerForClass')->willReturn($this->em);
     $this->doctrineHelper = new DoctrineHelper($doctrine);
     $this->entityNameResolver = $this->getMockBuilder('Oro\\Bundle\\EntityBundle\\Provider\\EntityNameResolver')->disableOriginalConstructor()->getMock();
     $this->associationManager = new AssociationManager($this->configManager, $this->eventDispatcher, $this->doctrineHelper, $this->entityNameResolver);
 }
예제 #13
0
 protected function setUp()
 {
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'Oro\\Bundle\\ActivityBundle\\Tests\\Unit\\Fixtures\\Entity');
     $this->em = $this->getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
     $this->em->getConfiguration()->setEntityNamespaces(['Test' => 'Oro\\Bundle\\ActivityBundle\\Tests\\Unit\\Fixtures\\Entity']);
     $doctrine = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $doctrine->expects($this->any())->method('getManagerForClass')->will($this->returnValue($this->em));
     $doctrine->expects($this->any())->method('getAliasNamespace')->will($this->returnValueMap([['Test', 'Oro\\Bundle\\ActivityBundle\\Tests\\Unit\\Fixtures\\Entity']]));
     $this->activityConfigProvider = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Provider\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $this->entityConfigProvider = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Provider\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $this->extendConfigProvider = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Provider\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $this->manager = new ActivityManager(new DoctrineHelper($doctrine), new EntityClassResolver($doctrine), $this->activityConfigProvider, $this->entityConfigProvider, $this->extendConfigProvider);
 }