示例#1
0
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception');
     \Aimeos\Client\Html\Catalog\Stage\Factory::createClient($this->context, $this->templatePaths, 'notfound');
 }
 /**
  * Renders the catalog stage section.
  */
 public function stageAction()
 {
     $templatePaths = Base::getAimeos()->getCustomPaths('client/html');
     $client = \Aimeos\Client\Html\Catalog\Stage\Factory::createClient($this->getContext(), $templatePaths);
     return $this->getClientOutput($client);
 }
 /**
  * @test
  */
 public function stageAction()
 {
     $name = '\\Aimeos\\Client\\Html\\Catalog\\Stage\\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\Stage\Factory::injectClient($name, $client);
     $output = $this->object->stageAction();
     \Aimeos\Client\Html\Catalog\Stage\Factory::injectClient($name, null);
     $this->assertEquals('body', $output);
 }