initPhpcr() protected méthode

NOTE: We could use the document initializer here rather than manually creating the webspace nodes, but it currently adds more overhead and offers no control over *which* webspaces are created, see https://github.com/sulu-io/sulu/pull/2063 for a solution.
protected initPhpcr ( )
 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);
 }
Exemple #2
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::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());
 }