Exemplo n.º 1
0
 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');
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public static function bootstrap()
 {
     self::getAimeos();
     \Aimeos\MShop\Factory::setCache(false);
     \Aimeos\Controller\Jsonapi\Factory::setCache(false);
 }