Пример #1
0
 public function testASuccessfulJsonResponseWillBeDecodedToAGraphEdge()
 {
     $graphResponseJson = '{"data":[{"id":"123","name":"Foo"},{"id":"1337","name":"Bar"}]}';
     $response = new FacebookResponse($this->request, $graphResponseJson, 200);
     $graphEdge = $response->getGraphEdge();
     $this->assertFalse($response->isError(), 'Did not expect Response to return an error.');
     $this->assertInstanceOf('Facebook\\GraphNodes\\GraphNode', $graphEdge[0]);
     $this->assertInstanceOf('Facebook\\GraphNodes\\GraphNode', $graphEdge[1]);
 }