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