Пример #1
0
 public function testConnectionOAuth1()
 {
     $_GET['oauth_token'] = 'fake_value';
     $_GET['oauth_verifier'] = 'fake_value';
     $sync = new SyncService(['serviceClass' => '\\tests\\models\\TestOAuth1', 'serviceSettings' => ['authUrl' => 'https://fake_service/oauth/authorize'], 'returnUrl' => 'http://my_own_site/returnUrl']);
     $sync->service->fetchRequestToken();
     $this->assertTrue(!$sync->isConnected());
     $this->assertTrue($sync->connect());
     $this->assertTrue($sync->isConnected());
     $sync->disconnect();
     $this->assertTrue(!$sync->isConnected());
 }