public function testGetInstance()
 {
     TwitterOAuth::setConfig(realpath(__DIR__ . '/ExampleConfig.yaml'));
     Request::getInstance()->setCurrentUrl('http://admin.w3.com/batman-is-better-than-superman/?batman=one&superman=two');
     // other tests might change the library, which can cause this test to fail
     Bridge::setLibrary('\\Webiny\\Component\\TwitterOAuth\\Bridge\\League\\TwitterOAuth');
     $instance = TwitterOAuthLoader::getInstance('MyTwitterApp');
     $this->assertInstanceOf('\\Webiny\\Component\\TwitterOAuth\\TwitterOAuth', $instance);
 }
 public function dataProvider()
 {
     TwitterOAuth::setConfig(__DIR__ . '/ExampleConfig.yaml');
     $config = TwitterOAuth::getConfig();
     // create bridge
     $bridge = new \Webiny\Component\TwitterOAuth\Bridge\League\TwitterOAuth($config->get('MyTwitterApp.ClientId'), $config->get('MyTwitterApp.ClientSecret'), '/');
     // replace the \TwitterOAuth instance with mock
     $bridge = new TwitterOAuthMock($config->get('MyTwitterApp.ClientId'), $config->get('MyTwitterApp.ClientSecret'), '/');
     //$bridge->setDriverInstance($mock);
     // create TwitterOAuth instance
     $instance = new TwitterOAuth($bridge);
     return [[$instance]];
 }