knowndiaspora/external/facebook-sdk/tests/GraphSessionInfoTest.php

27 lines
678 B
PHP
Raw Normal View History

2015-01-17 23:12:58 +01:00
<?php
use Facebook\GraphSessionInfo;
use Facebook\FacebookRequest;
use Facebook\FacebookSession;
class GraphSessionInfoTest extends PHPUnit_Framework_TestCase
{
public function testSessionInfo()
{
$params = array(
'input_token' => FacebookTestHelper::$testSession->getToken()
);
$response = (new FacebookRequest(
new FacebookSession(FacebookTestHelper::getAppToken()),
'GET',
'/debug_token',
$params
))->execute()->getGraphObject(GraphSessionInfo::className());
$this->assertTrue($response instanceof GraphSessionInfo);
$this->assertNotNull($response->getAppId());
$this->assertTrue($response->isValid());
}
}