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); }
/** * Convenience method for creating a GraphEvent collection. * * @return \Facebook\GraphNodes\GraphEvent * * @throws FacebookSDKException */ public function getGraphEvent() { $factory = new GraphNodeFactory($this); return $factory->makeGraphEvent(); }