public function testGetProviderWithDefinedService()
{
$serviceManager = new ServiceManager();
$config = array('default' => array('cache' => 'myZf2Service'));
$serviceManager->setFactory('myZf2Service', function () {
return new FilePathCache('somewhere', 'somfile');
});
$assetManager = new AssetCacheManager($serviceManager, $config);
$reflectionMethod = new \ReflectionMethod(AssetCacheManager::class, 'getProvider');
$reflectionMethod->setAccessible(true);
$provider = $reflectionMethod->invoke($assetManager, 'no/path');
$this->assertTrue($provider instanceof FilePathCache);
}