35866-vm/vendor/facebook/graph-sdk/tests/GraphUserTest.php
Flatlogic Bot 903cf599f0 rfresh1
2025-11-20 09:45:59 +00:00

28 lines
671 B
PHP

<?php
use Facebook\FacebookRequest;
use Facebook\GraphUser;
class GraphUserTest extends PHPUnit_Framework_TestCase
{
public function testMeReturnsGraphUser()
{
$response = (
new FacebookRequest(
FacebookTestHelper::$testSession,
'GET',
'/me'
))->execute()->getGraphObject(GraphUser::className());
$info = FacebookTestHelper::$testSession->getSessionInfo();
$this->assertTrue($response instanceof GraphUser);
$this->assertEquals($info->getId(), $response->getId());
$this->assertNotNull($response->getName());
$this->assertNotNull($response->getLastName());
$this->assertNotNull($response->getLink());
}
}