예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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";
 }
예제 #4
0
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception');
     \Aimeos\Client\Html\Catalog\Filter\Factory::createClient($this->context, $this->templatePaths, 'notfound');
 }
예제 #5
0
 /**
  * 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);
 }