public function testParentGroupGetsCastAsGraphGroup()
 {
     $dataFromGraph = ['parent_group' => ['id' => '1337']];
     $this->responseMock->shouldReceive('getDecodedBody')->once()->andReturn($dataFromGraph);
     $factory = new GraphNodeFactory($this->responseMock);
     $graphObject = $factory->makeGraphEvent();
     $parentGroup = $graphObject->getParentGroup();
     $this->assertInstanceOf('\\Facebook\\GraphNodes\\GraphGroup', $parentGroup);
 }
Esempio n. 2
0
 /**
  * Convenience method for creating a GraphEvent collection.
  *
  * @return \Facebook\GraphNodes\GraphEvent
  *
  * @throws FacebookSDKException
  */
 public function getGraphEvent()
 {
     $factory = new GraphNodeFactory($this);
     return $factory->makeGraphEvent();
 }