public function setUp() { $this->bag = new ConfigDefinitionImmutableBag($this->settings); $this->dispatcher = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcher')->disableOriginalConstructor()->getMock(); $this->manager = new ConfigManager($this->bag, $this->dispatcher); $this->globalScopeManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\GlobalScopeManager')->disableOriginalConstructor()->getMock(); $this->userScopeManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\GlobalScopeManager')->disableOriginalConstructor()->getMock(); $this->manager->addManager('global', $this->globalScopeManager); $this->manager->addManager('user', $this->userScopeManager); $this->manager->setScopeName('user'); }
public function setUp() { $this->bag = new ConfigDefinitionImmutableBag($this->settings); $this->dispatcher = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcher')->disableOriginalConstructor()->getMock(); $this->manager = new ConfigManager('user', $this->bag, $this->dispatcher, new ConfigValueBag()); $this->globalScopeManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\GlobalScopeManager')->disableOriginalConstructor()->getMock(); $this->userScopeManager = $this->getMockBuilder('Oro\\Bundle\\ConfigBundle\\Config\\GlobalScopeManager')->disableOriginalConstructor()->getMock(); $this->userScopeManager->expects($this->any())->method('getScopeId')->willReturn(123); $this->manager->addManager('user', $this->userScopeManager); $this->manager->addManager('global', $this->globalScopeManager); }