protected function createResourceOwner(array $options, $name, $paths = null) { $this->buzzClient = $this->getMockBuilder('\\Buzz\\Client\\ClientInterface')->disableOriginalConstructor()->getMock(); $httpUtils = $this->getMockBuilder('\\Symfony\\Component\\Security\\Http\\HttpUtils')->disableOriginalConstructor()->getMock(); $resourceOwner = new GenericOAuth2ResourceOwner($this->buzzClient, $httpUtils, $options, $name); $resourceOwner->addPaths($paths ?: $this->getDefaultPaths()); return $resourceOwner; }