예제 #1
0
 public function testPlacePropertyWillGetCastAsGraphPageObject()
 {
     $dataFromGraph = ['id' => '123', 'name' => 'Foo Album', 'place' => ['id' => '1', 'name' => 'For Bar Place']];
     $this->responseMock->shouldReceive('getDecodedBody')->once()->andReturn($dataFromGraph);
     $factory = new GraphNodeFactory($this->responseMock);
     $graphNode = $factory->makeGraphAlbum();
     $place = $graphNode->getPlace();
     $this->assertInstanceOf('\\Facebook\\GraphNodes\\GraphPage', $place);
 }
예제 #2
0
 /**
  * Convenience method for creating a GraphAlbum collection.
  *
  * @return \Facebook\GraphNodes\GraphAlbum
  *
  * @throws FacebookSDKException
  */
 public function getGraphAlbum()
 {
     $factory = new GraphNodeFactory($this);
     return $factory->makeGraphAlbum();
 }