protected function setUp() { parent::setUp(); $this->factory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManagerFactoryInterface'); $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock(); $this->blocksAdder = new BlocksAdder($this->blockRepository, $this->factory); }
protected function setUp() { parent::setUp(); $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface'); $this->validator = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Validator\\ParametersValidatorPageManager')->disableOriginalConstructor()->getMock(); $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock(); $this->initRepository(); $this->translator = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Translator\\TranslatorInterface'); $this->container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'); }
protected function setUp() { parent::setUp(); $this->validator = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Validator\\ParametersValidatorLanguageManager')->disableOriginalConstructor()->getMock(); $this->languageRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\LanguageRepositoryPropel')->disableOriginalConstructor()->getMock(); $this->languageRepository->expects($this->any())->method('getRepositoryObjectClassName')->will($this->returnValue('\\RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Model\\Language')); $this->factoryRepository = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Factory\\FactoryRepositoryInterface'); $this->factoryRepository->expects($this->any())->method('createRepository')->will($this->returnValue($this->languageRepository)); $this->languageManager = new LanguageManager($this->eventsHandler, $this->factoryRepository, $this->validator); }
protected function setUp() { parent::setUp(); $this->validator = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Validator\\ParametersValidatorPageManager')->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)); $this->blockManager = new BlockManagerUnitTester($this->eventsHandler, $this->factoryRepository, $this->validator); $this->blockManager->setDefaultValue(array("Content" => "Test value")); }
protected function setUp() { parent::setUp(); $this->factory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManagerFactoryInterface'); $this->blockRepository = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Repository\\Propel\\BlockRepositoryPropel')->disableOriginalConstructor()->getMock(); $this->blocksAdded = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Slot\\Blocks\\BlocksAdder')->disableOriginalConstructor()->getMock(); $this->blocksRemover = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Slot\\Blocks\\BlocksRemover')->disableOriginalConstructor()->getMock(); $this->blockManagersCollection = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Slot\\Blocks\\BlockManagersCollection')->getMock(); $this->slot = new Slot('test', array('repeated' => 'page')); $this->slotManager = new SlotManager($this->slot, $this->blockRepository, $this->factory); }
protected function setUp() { parent::setUp(); $this->themeSlots = $this->getMock('RedKiteLabs\\ThemeEngineBundle\\Core\\ThemeSlots\\ThemeSlotsInterface'); $this->template = $this->getMockBuilder('RedKiteLabs\\ThemeEngineBundle\\Core\\Template\\Template')->disableOriginalConstructor()->getMock(); $this->pageBlocks = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\PageBlocks\\PageBlocks')->disableOriginalConstructor()->getMock(); $this->pageBlocks->expects($this->any())->method('getIdPage')->will($this->returnValue(2)); $this->pageBlocks->expects($this->any())->method('getIdLanguage')->will($this->returnValue(2)); $this->validator = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Validator\\ParametersValidatorPageManager')->disableOriginalConstructor()->getMock(); $this->blockManager = $this->getMockBuilder('RedKiteLabs\\RedKiteCms\\RedKiteCmsBaseBlocksBundle\\Core\\Block\\Image\\BlockManagerImage')->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)); $this->factory = $this->getMock('RedKiteLabs\\RedKiteCms\\RedKiteCmsBundle\\Core\\Content\\Block\\BlockManagerFactoryInterface'); $this->factory->expects($this->any())->method('createBlockManager')->will($this->returnValue($this->blockManager)); }
protected function setUp() { parent::setUp(); $this->blocksManagerCollection = new BlockManagersCollection(); }