Exemple #1
0
 public function dataProvider()
 {
     OAuth2::setConfig(realpath(__DIR__ . '/' . self::CONFIG));
     $mock = new Mocks\OAuth2BridgeMock('1', 'secret', 'redirect_uri');
     $oauth2 = new OAuth2($mock);
     return [[$oauth2]];
 }
Exemple #2
0
 public function dataProvider()
 {
     OAuth2::setConfig(realpath(__DIR__ . '/' . self::CONFIG));
     $oauth2User = new OAuth2User('webiny', '*****@*****.**');
     return [[$oauth2User]];
 }
 public function testGetInstance()
 {
     OAuth2::setConfig(realpath(__DIR__ . '/' . self::CONFIG));
     $instance = OAuth2Loader::getInstance('Facebook');
     $this->assertInstanceOf('\\Webiny\\Component\\OAuth2\\OAuth2', $instance);
 }
Exemple #4
0
 public function setUp()
 {
     \Webiny\Component\OAuth2\OAuth2::setConfig(__DIR__ . '/OAuth2ExampleConfig.yaml');
 }
 public function dataProvider()
 {
     OAuth2::setConfig(realpath(__DIR__ . '/' . self::CONFIG));
     Request::getInstance()->setCurrentUrl('http://admin.w3.com/batman-is-better-than-superman/?batman=one&superman=two');
     $oauth2Instance = OAuth2Loader::getInstance('Facebook');
     $oauth2Request = new OAuth2Request($oauth2Instance);
     return [[$oauth2Request]];
 }