public function testASuccessfulJsonResponseWillBeDecodedToAGraphObject() { $graphResponseJson = '{"id":"123","name":"Foo"}'; $response = new FacebookResponse($this->request, $graphResponseJson, 200); $decodedResponse = $response->getDecodedBody(); $graphObject = $response->getGraphObject(); $this->assertFalse($response->isError(), 'Did not expect Response to return an error.'); $this->assertEquals(['id' => '123', 'name' => 'Foo'], $decodedResponse); $this->assertInstanceOf('Facebook\\GraphNodes\\GraphObject', $graphObject); }