/** * Renders the catalog detail section. */ public function detailAction() { if (is_object($GLOBALS['TSFE']) && isset($GLOBALS['TSFE']->config['config'])) { $GLOBALS['TSFE']->config['config']['noPageTitle'] = 2; } $templatePaths = Base::getAimeos()->getCustomPaths('client/html'); $client = \Aimeos\Client\Html\Catalog\Detail\Factory::createClient($this->getContext(), $templatePaths); return $this->getClientOutput($client); }
/** * @test */ public function detailAction() { $name = '\\Aimeos\\Client\\Html\\Catalog\\Detail\\Standard'; $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), array(), '', false); $client->expects($this->once())->method('getBody')->will($this->returnValue('body')); $client->expects($this->once())->method('getHeader')->will($this->returnValue('header')); \Aimeos\Client\Html\Catalog\Detail\Factory::injectClient($name, $client); $output = $this->object->detailAction(); \Aimeos\Client\Html\Catalog\Detail\Factory::injectClient($name, null); $this->assertEquals('body', $output); }
public function testCreateClientNameNotFound() { $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception'); \Aimeos\Client\Html\Catalog\Detail\Factory::createClient($this->context, $this->templatePaths, 'notfound'); }
public function testDetailBody() { $start = microtime(true); $client = \Aimeos\Client\Html\Catalog\Detail\Factory::createClient($this->context, $this->paths); $client->setView($this->view); $client->getBody(); $stop = microtime(true); echo "\n catalog detail body: " . ($stop - $start) * 1000 . " msec\n"; }