/** * @test */ public function stockAction() { $name = '\\Aimeos\\Client\\Html\\Catalog\\Stock\\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\Stock\Factory::injectClient($name, $client); $output = $this->object->stockAction(); \Aimeos\Client\Html\Catalog\Stock\Factory::injectClient($name, null); $this->assertEquals('body', $output); }