public function setCacheDirectoryAllowsToSetTheCurrentCacheDirectory()
{
$mockCache = $this->createMock(AbstractFrontend::class);
$mockCache->expects($this->any())->method('getIdentifier')->will($this->returnValue('SomeCache'));
$mockEnvironmentConfiguration = $this->createEnvironmentConfigurationMock([__DIR__ . '~Testing', 'vfs://Foo/', 1024]);
// We need to create the directory here because vfs doesn't support touch() which is used by
// createDirectoryRecursively() in the setCache method.
mkdir('vfs://Foo/Cache');
mkdir('vfs://Foo/OtherDirectory');
$backend = new FileBackend($mockEnvironmentConfiguration, ['cacheDirectory' => 'vfs://Foo/OtherDirectory']);
$backend->setCache($mockCache);
$this->assertEquals('vfs://Foo/OtherDirectory/', $backend->getCacheDirectory());
}