Example #1
0
 public function testResponseValues()
 {
     $resource = $this->prophesize(Resource::CLASS);
     $resource->asJson()->willReturn('foobar');
     $response = new Response($resource->reveal());
     $this->assertSame(200, $response->getStatusCode());
     $this->assertSame('application/hal+json', $response->getHeaderLine('Content-Type'));
     $this->assertSame('foobar', (string) $response->getBody());
 }