상속: extends Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\BaseTestCase
 public function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->initPhpcr();
     $this->mapper = $this->getContainer()->get('sulu.content.mapper');
     $this->structureManager = $this->getContainer()->get('sulu.content.structure_manager');
     $this->webspaceManager = $this->getContainer()->get('sulu_core.webspace.webspace_manager');
     $this->sessionManager = $this->getContainer()->get('sulu.phpcr.session');
     $this->contentQuery = $this->getContainer()->get('sulu.content.query_executor');
     $this->languageNamespace = $this->getContainer()->getParameter('sulu.content.language.namespace');
     $em = $this->getContainer()->get('doctrine')->getManager();
     $user = $em->getRepository('Sulu\\Bundle\\SecurityBundle\\Entity\\User')->findOneByUsername('test');
     $this->tag1 = new Tag();
     $this->tag1->setName('test1');
     $this->tag1->setCreator($user);
     $this->tag1->setChanger($user);
     $em->persist($this->tag1);
     $this->tag2 = new Tag();
     $this->tag2->setName('test2');
     $this->tag2->setCreator($user);
     $this->tag2->setChanger($user);
     $em->persist($this->tag2);
     $this->tag3 = new Tag();
     $this->tag3->setName('test3');
     $this->tag3->setCreator($user);
     $this->tag3->setChanger($user);
     $em->persist($this->tag3);
     $em->flush();
 }
예제 #2
0
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     $this->initOrm();
 }
예제 #3
0
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     $this->setUpCollection();
     $this->setUpMedia();
 }
예제 #4
0
 protected function setUp()
 {
     parent::setUp();
     $this->em = $this->db('ORM')->getOm();
     $this->purgeDatabase();
     $this->setUpOperators();
     $this->client = $this->createAuthenticatedClient();
 }
예제 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->documentManager = $this->getContainer()->get('sulu_document_manager.document_manager');
     $this->phpcrSession = $this->getContainer()->get('doctrine_phpcr')->getConnection();
     $this->initPhpcr();
     $this->loadFixtures();
     $this->client = $this->createAuthenticatedClient();
 }
예제 #6
0
 public function setUp()
 {
     parent::setUp();
     $this->db('ORM')->purgeDatabase();
     $this->client = $this->createAuthenticatedClient();
     $this->searchManager = $this->client->getContainer()->get('massive_search.search_manager');
     $this->entityManager = $this->getContainer()->get('doctrine.orm.entity_manager');
     $this->createUser();
     $this->indexProducts();
 }
예제 #7
0
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     $this->initOrm();
     $this->systemCollectionCache = $this->getContainer()->get('sulu_media.system_collections.cache');
     $this->systemCollectionConfig = $this->getContainer()->getParameter('sulu_media.system_collections');
     // to be sure that the system collections will rebuild after purge database
     $this->systemCollectionCache->invalidate();
 }
예제 #8
0
 protected function setUp()
 {
     parent::initPhpcr();
     $this->mapper = $this->getContainer()->get('sulu.content.mapper');
     $this->structureManager = $this->getContainer()->get('sulu.content.structure_manager');
     $this->serializer = $this->getContainer()->get('jms_serializer');
     $this->sessionManager = $this->getContainer()->get('sulu.phpcr.session');
     $this->dataCache = new ArrayCache();
     $this->changesCache = new ArrayCache();
     $this->cache = new DoctrineCacheProvider($this->mapper, $this->structureManager, $this->serializer, $this->dataCache, $this->changesCache);
 }
예제 #9
0
 public function setUp()
 {
     parent::setUp();
     /** @var ObjectManager $em */
     $em = $this->getContainer()->get('doctrine.orm.entity_manager');
     foreach ($this->mediaTypes as $mediaTypeData) {
         $mediaType = new MediaType();
         $mediaType->setName($mediaTypeData['type']);
         $em->persist($mediaType);
     }
     $em->flush();
     $this->typeManager = new TypeManager($em, $this->mediaTypes, ['file/exe']);
 }
예제 #10
0
 protected function setUp()
 {
     parent::initPhpcr();
     $this->mapper = $this->getContainer()->get('sulu.content.mapper');
     $this->preview = $this->getContainer()->get('sulu_content.preview');
     /** @var AdminRequestAnalyzer $requestAnalyzer */
     $requestAnalyzer = $this->getContainer()->get('sulu_core.webspace.request_analyzer');
     $requestAnalyzer->setWebspaceKey('sulu_io');
     $requestAnalyzer->setLocalizationCode('en');
     $class = new \ReflectionClass(get_class($this->preview));
     $property = $class->getProperty('previewCache');
     $property->setAccessible(true);
     $this->previewCache = $property->getValue($this->preview);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     $this->fileVersionMetaRepository = $this->em->getRepository('SuluMediaBundle:FileVersionMeta');
     $this->collectionType = new CollectionType();
     $this->collectionType->setName('image');
     $this->collection = new Collection();
     $this->collection->setType($this->collectionType);
     $this->mediaType = new MediaType();
     $this->mediaType->setName('image');
     $this->em->persist($this->collectionType);
     $this->em->persist($this->mediaType);
     $this->em->persist($this->collection);
     $this->em->flush();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     $collectionType = new CollectionType();
     $collectionType->setName('Default Type');
     $collectionType->setDescription('Default Collection Type');
     $this->em->persist($collectionType);
     foreach ($this->collectionData as $collection) {
         $this->collections[] = $this->createCollection($collection[0], $collection[1], $collectionType);
     }
     $this->em->flush();
     /** @var CollectionRepository $repository */
     $repository = $this->getContainer()->get('sulu_media.collection_repository');
     $repository->recover();
     $this->em->flush();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->purgeDatabase();
     $this->em = $this->db('ORM')->getOm();
     foreach ($this->collectionData as $collection) {
         $this->collections[] = $this->createCollection($collection[0], $collection[1]);
     }
     $this->em->flush();
     foreach ($this->mediaTypeData as $type) {
         $this->mediaTypes[$type] = $this->createType($type);
     }
     $this->em->flush();
     foreach ($this->tagData as $tag) {
         $this->tags[] = $this->createTag($tag);
     }
     $this->em->flush();
     foreach ($this->mediaData as $media) {
         $this->medias[] = $this->createMediaWithTags($media[0], $media[1], $media[2], $media[3], $media[4]);
     }
     $this->em->flush();
 }
예제 #14
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::$fixturePath = __DIR__ . '/../../DataFixtures/Files';
 }
예제 #15
0
 public function tearDown()
 {
     parent::tearDown();
     if (file_exists(self::$fixturePath . '/Export.en.xlf')) {
         unlink(self::$fixturePath . '/Export.en.xlf');
     }
     if (file_exists(self::$fixturePath . '/Export.en.json')) {
         unlink(self::$fixturePath . '/Export.en.json');
     }
 }
 public function setUp()
 {
     parent::setUp();
     $this->initOrm();
 }
예제 #17
0
 public function setUp()
 {
     parent::setUp();
     $this->command = $this->getContainer()->get($this->commandServiceName);
 }
예제 #18
0
 protected function setUp()
 {
     parent::initPhpcr();
     $this->mapper = $this->getContainer()->get('sulu.content.mapper');
     $this->component = new PreviewMessageHandler($this->getContainer()->get('sulu_content.preview'), $this->getContainer()->get('sulu_core.webspace.request_analyzer.admin'), $this->getContainer()->get('doctrine'), $this->mapper, new NullLogger());
 }