/** * @test */ public function historyAction() { $name = '\\Aimeos\\Client\\Html\\Account\\History\\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\Account\History\Factory::injectClient($name, $client); $output = $this->object->historyAction(); \Aimeos\Client\Html\Account\History\Factory::injectClient($name, null); $this->assertEquals('body', $output); }
/** * Renders the account history. */ public function historyAction() { $templatePaths = Base::getAimeos()->getCustomPaths('client/html'); $client = \Aimeos\Client\Html\Account\History\Factory::createClient($this->getContext(), $templatePaths); return $this->getClientOutput($client); }
public function testCreateClientNameNotFound() { $this->setExpectedException('\\Aimeos\\Client\\Html\\Exception'); \Aimeos\Client\Html\Account\History\Factory::createClient($this->context, $this->templatePaths, 'notfound'); }