protected function getManager(array $config) { $repo = Mockery::mock(Repository::class); $factory = Mockery::mock(GoogleClientFactory::class); $manager = new GoogleClientManager($repo, $factory); $manager->getConfig()->shouldReceive('get')->once()->with('google-client.connections')->andReturn(['google-client' => $config]); $config['name'] = 'google-client'; $manager->getFactory()->shouldReceive('make')->once()->with($config)->andReturn(Mockery::mock(Google_Client::class)); return $manager; }
/** * Get the factory instance. * * @return \Websight\L5GoogleClient\GoogleClientFactory * @static */ public static function getFactory() { return \Websight\L5GoogleClient\GoogleClientManager::getFactory(); }