public function setUp()
 {
     $storage = new PdoStorage(new PDO($GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWD']));
     $storage->initDatabase();
     $storage->addClient(new ClientData(array('id' => 'testclient', 'name' => 'Simple Test Client', 'description' => 'Client for unit testing', 'secret' => null, 'icon' => null, 'allowed_scope' => 'read', 'disable_user_consent' => false, 'contact_email' => '*****@*****.**', 'redirect_uri' => 'http://localhost/php-oauth/unit/test.html', 'type' => 'token')));
     $storage->storeAccessToken('foo', 1111111111, 'testclient', 'fkooman', 'foo bar', 1234);
     $storage->storeAccessToken('bar', 1111111111, 'testclient', 'frko', 'a b c', 1234);
     $ioStub = $this->getMockBuilder('fkooman\\OAuth\\Server\\IO')->getMock();
     $ioStub->method('getRandomHex')->will($this->onConsecutiveCalls('11111111'));
     $ioStub->method('getTime')->willReturn(1111111111);
     $this->service = new TokenIntrospectionService($storage, $ioStub);
 }