/** * @test */ public function smallAction() { $name = 'Client_Html_Basket_Mini_Default'; $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')); \Client_Html_Basket_Mini_Factory::injectClient($name, $client); $output = $this->object->smallAction(); \Client_Html_Basket_Mini_Factory::injectClient($name, null); $this->assertEquals('body', $output); }
public function testCreateClientNameNotFound() { $this->setExpectedException('Client_Html_Exception'); 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 = \Client_Html_Basket_Mini_Factory::createClient($this->getContext(), $templatePaths); return $this->getClientOutput($client); }