protected function setUp()
 {
     parent::setUp();
     $this->eventsHandler = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\EventsHandler\\EventsHandlerInterface');
     $this->validator = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Validator\\ParametersValidator')->disableOriginalConstructor()->getMock();
     $this->contentManager = new ContentManagerTester($this->eventsHandler, $this->validator);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->pdo = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Tests\\Unit\\Core\\Repository\\Propel\\Pdo\\MockPDO');
     $this->propelRepository = new TestRepositoryPropel($this->pdo);
     $this->modelObject = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Model\\Block');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->event = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Event\\Actions\\Block\\BlockEditedEvent')->disableOriginalConstructor()->getMock();
     $this->engine = $this->getMock('Symfony\\Component\\Templating\\EngineInterface');
     $this->testListener = new ImagesBlockEditedListener($this->engine);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->securityContext = $this->getMockBuilder('Symfony\\Component\\Security\\Core\\SecurityContext')->disableOriginalConstructor()->getMock();
     $this->resourcesLocker = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\ResourcesLocker\\ResourcesLocker')->disableOriginalConstructor()->getMock();
     $this->event = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent')->disableOriginalConstructor()->getMock();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->request = $this->getMock('Symfony\\Component\\HttpFoundation\\Request');
     $this->response = $this->getMock('Symfony\\Component\\HttpFoundation\\Response');
     $this->blockManager = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManagerInterface');
     $this->event = new BlockEditedEvent($this->request, $this->blockManager, $this->response);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->configurationRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Repository\\ConfigurationRepositoryInterface');
     $factoryRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepository')->disableOriginalConstructor()->getMock();
     $factoryRepository->expects($this->at(0))->method('createRepository')->with('Configuration')->will($this->returnValue($this->configurationRepository));
     $this->configurationManager = new ConfigurationManager($factoryRepository);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->templating = $this->getMock('Symfony\\Bundle\\FrameworkBundle\\Templating\\EngineInterface');
     $this->translator = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Translator\\TranslatorInterface');
     $this->event = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent')->disableOriginalConstructor()->getMock();
     $this->listener = new ExceptionListener($this->templating, $this->translator);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->pageContents = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\PageBlocks\\PageBlocks')->disableOriginalConstructor()->getMock();
     $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $this->factoryRepository->expects($this->any())->method('createRepository')->will($this->returnValue($this->blockRepository));
 }
 protected function setUp()
 {
     parent::setUp();
     $this->event = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Event\\Actions\\Block\\BlockEditorRenderingEvent')->disableOriginalConstructor()->getMock();
     $this->container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->engine = $this->getMock('Symfony\\Component\\Templating\\EngineInterface');
     $this->blockManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManager')->disableOriginalConstructor()->getMock();
 }
示例#10
0
 protected function setUp()
 {
     parent::setUp();
     $this->root = vfsStream::setup('root');
     $templateNameParser = $this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface');
     $templateLocator = $this->getMockBuilder('Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator')->disableOriginalConstructor()->getMock();
     $this->parser = new TemplateParser($templateLocator, $templateNameParser);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->lockedResourceRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\LockedResourceRepositoryPropel')->disableOriginalConstructor()->getMock();
     $factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $factoryRepository->expects($this->once())->method('createRepository')->with('LockedResource')->will($this->returnValue($this->lockedResourceRepository));
     $this->resourcesLocker = new ResourcesLocker($factoryRepository);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface');
     $this->pageTree = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\PageTree\\PageTree')->setMethods(array('getTemplate', 'getLanguage', 'getPage', 'setDataManager', 'setUp'))->disableOriginalConstructor()->getMock();
     $this->aligner = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Slot\\Repeated\\Aligner\\RepeatedSlotsAligner')->disableOriginalConstructor()->getMock();
     $this->dataManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\PageTree\\DataManager\\DataManager')->disableOriginalConstructor()->getMock();
     $this->container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->event = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent')->disableOriginalConstructor()->getMock();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->securityContext = $this->getMock('Symfony\\Component\\Security\\Core\\SecurityContextInterface');
     $this->authenticationTrustResolver = $this->getMock('Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface');
     $this->request = $this->getMock('Symfony\\Component\\HttpFoundation\\Request');
     $this->event = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent')->disableOriginalConstructor()->getMock();
     $this->event->expects($this->once())->method('getRequest')->will($this->returnValue($this->request));
     $this->testListener = new AccessDeniedListener($this->securityContext, $this->authenticationTrustResolver);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->themes = $this->getMock('RedKiteLabs\\ThemeEngineBundle\\Core\\ThemesCollection\\ThemesCollection');
     $this->template = $this->getMockBuilder('RedKiteLabs\\ThemeEngineBundle\\Core\\Template\\Template')->disableOriginalConstructor()->getMock();
     $this->slotsConverterFactory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Slot\\Repeated\\Converter\\Factory\\SlotsConverterFactoryInterface');
     $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $this->factoryRepository->expects($this->at(0))->method('createRepository')->with('Block')->will($this->returnValue($this->blockRepository));
     $this->aligner = new RepeatedSlotsAligner($this->themes, $this->slotsConverterFactory, $this->factoryRepository);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->pageContents = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\PageBlocks\\PageBlocks')->disableOriginalConstructor()->getMock();
     $this->languageRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\LanguageRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->pageRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\PageRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $this->factoryRepository->expects($this->any())->method('createRepository')->will($this->onConsecutiveCalls($this->languageRepository, $this->pageRepository, $this->blockRepository));
     $this->blockRepository->expects($this->any())->method('getRepositoryObjectClassName')->will($this->returnValue('\\RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Model\\Block'));
     $this->blockRepository->expects($this->any())->method('setRepositoryObject')->will($this->returnSelf());
 }
 protected function setUp()
 {
     parent::setUp();
     $this->dataManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\PageTree\\DataManager\\DataManager')->disableOriginalConstructor()->getMock();
     $this->templateAssetsManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\PageTree\\TemplateAssetsManager\\TemplateAssetsManager')->disableOriginalConstructor()->getMock();
     $this->templateManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Template\\TemplateManager')->disableOriginalConstructor()->getMock();
     $this->pageBlocks = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\PageBlocks\\PageBlocksInterface');
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $themeSlots = $this->getMock('RedKiteLabs\\ThemeEngineBundle\\Core\\ThemeSlots\\ThemeSlotsInterface');
     $this->theme = $this->getMockBuilder('RedKiteLabs\\ThemeEngineBundle\\Core\\Theme\\Theme')->disableOriginalConstructor()->getMock();
     $this->theme->expects($this->any())->method('getThemeSlots')->will($this->returnValue($themeSlots));
 }
示例#17
0
 protected function setUp()
 {
     parent::setUp();
     $this->blockManagerFactory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManagerFactoryInterface');
     $this->languageRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\LanguageRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->pageRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\PageRepositoryPropel')->disableOriginalConstructor()->getMock();
     $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $this->factoryRepository->expects($this->at(0))->method('createRepository')->with('Language')->will($this->returnValue($this->languageRepository));
     $this->factoryRepository->expects($this->at(1))->method('createRepository')->with('Page')->will($this->returnValue($this->pageRepository));
     $this->templateManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Template\\TemplateManager')->disableOriginalConstructor()->getMock();
     $this->root = vfsStream::setup('root', null, array('Resources' => array()));
     $this->themeChanger = new ThemeChanger($this->templateManager, $this->factoryRepository);
 }
示例#18
0
 protected function setUp()
 {
     parent::setUp();
     $this->fileSystem = new Filesystem();
     $this->root = vfsStream::setup('root', null, array('src', 'bundle' => array()));
     $sensioDir = __DIR__ . '/../../../../../../../../../vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle';
     if (!is_dir($sensioDir)) {
         $sensioDir = __DIR__ . '/../../../../../vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle';
         if (!is_dir($sensioDir)) {
             $this->markTestSkipped('Sension Generator bundle is not available.');
         }
     }
     vfsStream::copyFromFileSystem($sensioDir, $this->root->getChild('bundle'));
     //print_r(vfsStream::inspect(new \org\bovigo\vfs\visitor\vfsStreamStructureVisitor())->getStructure());exit;
 }
示例#19
0
 protected function setUp()
 {
     parent::setUp();
     $this->routingGenerator = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Deploy\\RoutingGenerator\\RoutingGeneratorInterface');
     $this->sitemapGenerator = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Deploy\\SitemapGenerator\\SitemapGeneratorInterface');
     $this->pageTreeCollection = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Deploy\\PageTreeCollection\\PageTreeCollection')->disableOriginalConstructor()->getMock();
     $this->theme = $this->getMockBuilder('RedKiteLabs\\ThemeEngineBundle\\Core\\Theme\\Theme')->disableOriginalConstructor()->getMock();
     $this->activeTheme = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\ActiveTheme\\ActiveThemeInterface');
     $this->activeTheme->expects($this->any())->method('getActiveThemeBackend')->will($this->returnValue($this->theme));
     $this->activeTheme->expects($this->any())->method('getActiveThemeFrontend')->will($this->returnValue($this->theme));
     $this->sitemapGenerator = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Deploy\\SitemapGenerator\\SitemapGeneratorInterface');
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $folders = array('app' => array('config' => array('config.yml' => '')), 'web' => array('uploads' => array('assets' => array('media' => array('image1.png' => '', 'image2.png' => ''), 'js' => array('code.js' => ''), 'css' => array('style.css' => '')))), 'AcmeWebSiteBundle' => array('Resources' => array()), 'RedKiteCmsBundle' => array());
     $this->root = vfsStream::setup('root', null, $folders);
     //print_r(vfsStream::inspect(new \org\bovigo\vfs\visitor\vfsStreamStructureVisitor())->getStructure());exit;
 }
示例#20
0
 protected function setUp()
 {
     parent::setUp();
     $this->seo = new Seo();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->pdo = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Tests\\Unit\\Core\\Repository\\Propel\\Pdo\\MockPDO');
     $this->configurationRepository = new ConfigurationRepositoryPropel($this->pdo);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->factoryRepository = new FactoryRepository('Propel');
 }
示例#23
0
 protected function setUp()
 {
     parent::setUp();
     $this->language = new Language();
 }
示例#24
0
 protected function setUp()
 {
     parent::setUp();
     $this->page = new Page();
 }
示例#25
0
 protected function setUp()
 {
     parent::setUp();
     $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
     $this->dataManager = new DataManager($this->factoryRepository);
 }
示例#26
0
 protected function setUp()
 {
     parent::setUp();
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $this->eventsHandler = new EventsHandlerTester($this->dispatcher);
 }
示例#27
0
 protected function setUp()
 {
     parent::setUp();
     $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface');
     $this->factory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->blockManager = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\ContentManagerInterface');
     $this->event = new BaseActionEventTester($this->blockManager);
 }
示例#29
0
 protected function setUp()
 {
     parent::setUp();
     $this->templating = $this->getMock('Symfony\\Bundle\\FrameworkBundle\\Templating\\EngineInterface');
     $this->viewRenderer = new ViewRenderer($this->templating);
 }
示例#30
0
 protected function setUp()
 {
     parent::setUp();
     $this->translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
     $this->configuration = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Configuration\\ConfigurationInterface');
 }