/**
  * @test
  */
 public function indexAction()
 {
     $name = '\\Aimeos\\Client\\Html\\Checkout\\Standard\\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\Checkout\Standard\Factory::injectClient($name, $client);
     $output = $this->object->indexAction();
     \Aimeos\Client\Html\Checkout\Standard\Factory::injectClient($name, null);
     $this->assertEquals('body', $output);
 }
示例#2
0
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception');
     \Aimeos\Client\Html\Checkout\Standard\Factory::createClient($this->context, $this->templatePaths, 'notfound');
 }
 /**
  * Processes requests and renders the checkout process.
  */
 public function indexAction()
 {
     $templatePaths = Base::getAimeos()->getCustomPaths('client/html');
     $client = \Aimeos\Client\Html\Checkout\Standard\Factory::createClient($this->getContext(), $templatePaths);
     return $this->getClientOutput($client);
 }