Neos\Cache\Tests\Unit\Backend\RedisBackendTest::setUp PHP Method

setUp() public method

Set up test case
public setUp ( ) : void
return void
    public function setUp()
    {
        $phpredisVersion = phpversion('redis');
        if (version_compare($phpredisVersion, '1.2.0', '<')) {
            $this->markTestSkipped(sprintf('phpredis extension version %s is not supported. Please update to verson 1.2.0+.', $phpredisVersion));
        }
        $this->redis = $this->getMockBuilder(\Redis::class)->disableOriginalConstructor()->getMock();
        $this->cache = $this->createMock(FrontendInterface::class);
        $this->cache->expects($this->any())->method('getIdentifier')->will($this->returnValue('Foo_Cache'));
        $mockEnvironmentConfiguration = $this->getMockBuilder(EnvironmentConfiguration::class)->setConstructorArgs([__DIR__ . '~Testing', 'vfs://Foo/', 255])->getMock();
        $this->backend = new RedisBackend($mockEnvironmentConfiguration, ['redis' => $this->redis]);
        $this->backend->setCache($this->cache);
    }