public function testCanSendHeadersIndicatesFileAndLine() { $this->_response->headersSentThrowsException = true; try { $this->_response->canSendHeaders(true); $this->fail('canSendHeaders() should throw exception'); } catch (Exception $e) { $this->assertRegExp('/headers already sent in .+, line \\d+$/', $e->getMessage()); } }