Files
Testing/mongolian-og/source/server/vendor/facebook/php-sdk-v4/tests/GraphUserTest.php

28 lines
671 B
PHP
Raw Normal View History

2026-11-17 16:15:01 -05:00
<?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());
}
}