protected function setUp() { $this->context = \TestHelperJadm::getContext(); $templatePaths = \TestHelperJadm::getControllerPaths(); $this->view = $this->context->getView(); $this->object = new \Aimeos\Controller\JsonAdm\Media\Standard($this->context, $this->view, $templatePaths, 'price'); }
protected function setUp() { $this->context = \TestHelperJadm::getContext(); $templatePaths = \TestHelperJadm::getJsonadmPaths(); $this->view = $this->context->getView(); $this->object = new \Aimeos\Admin\JsonAdm\Standard($this->context, $this->view, $templatePaths, 'product'); }
protected function setUp() { $context = \TestHelperJadm::getContext(); $view = $context->getView(); $this->stub = $this->getMockBuilder('\\Aimeos\\Controller\\JsonAdm\\Standard')->setConstructorArgs(array($context, $view, array(), 'attribute'))->getMock(); $this->object = new TestBase($this->stub, $context, $view, array(), 'attribute'); }
protected function setUp() { $this->context = \TestHelperJadm::getContext(); $config = $this->context->getConfig(); $config->set('controller/jsonadm/common/decorators/default', array()); $config->set('controller/jsonadm/decorators/global', array()); $config->set('controller/jsonadm/decorators/local', array()); }
public function testClearSpecific() { $cache = \Aimeos\Controller\JsonAdm\Factory::setCache(true); $context = \TestHelperJadm::getContext(); $templatePaths = \TestHelperJadm::getControllerPaths(); $cntlA1 = \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, 'attribute'); $cntlB1 = \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, 'attribute/lists/type'); \Aimeos\Controller\JsonAdm\Factory::clear((string) $context, 'attribute'); $cntlA2 = \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, 'attribute'); $cntlB2 = \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, 'attribute/lists/type'); \Aimeos\Controller\JsonAdm\Factory::setCache($cache); $this->assertNotSame($cntlA1, $cntlA2); $this->assertSame($cntlB1, $cntlB2); }
public function testClearSpecific() { $cache = \Aimeos\Admin\JsonAdm\Factory::setCache(true); $context = \TestHelperJadm::getContext(); $templatePaths = \TestHelperJadm::getJsonadmPaths(); $cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, 'order'); $cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, 'order/base'); \Aimeos\Admin\JsonAdm\Factory::clear((string) $context, 'order'); $cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, 'order'); $cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, 'order/base'); \Aimeos\Admin\JsonAdm\Factory::setCache($cache); $this->assertNotSame($cntlA1, $cntlA2); $this->assertSame($cntlB1, $cntlB2); }