public function testDecorateSubClientGlobal() { $config = $this->context->getConfig(); $config->set('client/html/catalog/filter/tree/decorators/global', array('Example')); $object = \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, array())->getSubClient('tree'); $this->assertInstanceOf('\\Aimeos\\Client\\Html\\Common\\Decorator\\Iface', $object); }
public function testInjectClientReset() { $client = \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, array(), 'Standard'); \Aimeos\Client\Html\Catalog\Filter\Factory::injectClient('\\Aimeos\\Client\\Html\\Catalog\\Filter\\Standard', $client); \Aimeos\Client\Html\Catalog\Filter\Factory::injectClient('\\Aimeos\\Client\\Html\\Catalog\\Filter\\Standard', null); $new = \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, array(), 'Standard'); $this->assertNotSame($client, $new); }
public function testFilterBody() { $start = microtime(true); $client = \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, $this->paths); $client->setView($this->view); $client->getBody(); $stop = microtime(true); echo "\n catalog filter body: " . ($stop - $start) * 1000 . " msec\n"; }
public function testCreateClientNameNotFound() { $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception'); \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, $this->templatePaths, 'notfound'); }
/** * Renders the catalog filter section. */ public function filterAction() { $templatePaths = Base::getAimeos()->getCustomPaths('client/html'); $client = \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->getContext(), $templatePaths); return $this->getClientOutput($client); }