Beispiel #1
0
 public function testVenueGetsCastAsGraphLocation()
 {
     $dataFromGraph = ['venue' => ['id' => '1337']];
     $this->responseMock->shouldReceive('getDecodedBody')->once()->andReturn($dataFromGraph);
     $factory = new GraphNodeFactory($this->responseMock);
     $graphNode = $factory->makeGraphGroup();
     $venue = $graphNode->getVenue();
     $this->assertInstanceOf('\\Facebook\\GraphNodes\\GraphLocation', $venue);
 }
Beispiel #2
0
 /**
  * Convenience method for creating a GraphGroup collection.
  *
  * @return \Facebook\GraphNodes\GraphGroup
  *
  * @throws FacebookSDKException
  */
 public function getGraphGroup()
 {
     $factory = new GraphNodeFactory($this);
     return $factory->makeGraphGroup();
 }