public function testAddControllerDecoratorsExcludes() { $this->context->getConfig()->set('controller/jsonapi/decorators/excludes', array('TestDecorator')); $this->context->getConfig()->set('controller/jsonapi/common/decorators/default', array('TestDecorator')); $this->setExpectedException('\\Aimeos\\Controller\\Jsonapi\\Exception'); \Aimeos\Controller\Jsonapi\Factory::createController($this->context, array(), 'attribute', 'Standard'); }
public function testClearSpecific() { $cache = \Aimeos\Controller\Jsonapi\Factory::setCache(true); $context = \TestHelper::getContext(); $templatePaths = \TestHelper::getControllerPaths(); $cntlA1 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute'); $cntlB1 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute/lists/type'); \Aimeos\Controller\Jsonapi\Factory::clear((string) $context, 'attribute'); $cntlA2 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute'); $cntlB2 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute/lists/type'); \Aimeos\Controller\Jsonapi\Factory::setCache($cache); $this->assertNotSame($cntlA1, $cntlA2); $this->assertSame($cntlB1, $cntlB2); }
public static function bootstrap() { self::getAimeos(); \Aimeos\MShop\Factory::setCache(false); \Aimeos\Controller\Jsonapi\Factory::setCache(false); }