public function testHeadersAlreadySent() { $headers = $this->getMock('Riimu\\Kit\\FileResponse\\Headers', ['headersSent']); $headers->expects($this->once())->method('headersSent')->will($this->returnValue(true)); $handler = new ResponseHandler($headers); $this->setExpectedException('RuntimeException'); $handler->send($this->getMock('Riimu\\Kit\\FileResponse\\Response\\Response')); }