'text/xml']); $this->assertEquals(200, $response->getStatus()); $this->assertEquals('OK', $response->getStatusText()); } function testSetStatus() { $response = new Response(); $response->setStatus('402 Where\'s my money?'); $this->assertEquals(402, $response->getStatus()); $this->assertEquals('Where\'s my money?', $response->getStatusText()); } /** * @expectedException InvalidArgumentException */ function testInvalidStatus() { $response = new Response(1000); } function testToString() { $response = new Response(200, ['Content-Type' => 'text/xml']); $response->setBody('foo'); $expected = <<assertEquals($expected, (string)$response); } }