public function testCreateController() { $context = \TestHelper::getContext(); $config = $context->getConfig(); $config->set('controller/frontend/common/decorators/default', array()); $target = '\\Aimeos\\Controller\\Frontend\\Service\\Iface'; $controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelper::getContext()); $this->assertInstanceOf($target, $controller); $controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelper::getContext(), 'Standard'); $this->assertInstanceOf($target, $controller); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @access protected */ protected function setUp() { $context = \TestHelper::getContext(); $controller = \Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard'); $this->object = new \Aimeos\Controller\Frontend\Service\Decorator\Example($context, $controller); }