Neos\Flow\Tests\Unit\Cache\CacheFactoryTest::setUp PHP Метод

setUp() публичный Метод

Creates the mocked filesystem used in the tests
public setUp ( )
    public function setUp()
    {
        vfsStream::setup('Foo');
        $this->mockEnvironment = $this->createMock(Utility\Environment::class);
        $this->mockEnvironment->expects($this->any())->method('getPathToTemporaryDirectory')->will($this->returnValue('vfs://Foo/'));
        $this->mockEnvironment->expects($this->any())->method('getMaximumPathLength')->will($this->returnValue(1024));
        $this->mockEnvironment->expects($this->any())->method('getContext')->will($this->returnValue(new ApplicationContext('Testing')));
        $this->mockCacheManager = $this->getMockBuilder(CacheManager::class)->setMethods(['registerCache', 'isCachePersistent'])->disableOriginalConstructor()->getMock();
        $this->mockCacheManager->expects($this->any())->method('isCachePersistent')->will($this->returnValue(false));
        $this->mockEnvironmentConfiguration = $this->getMockBuilder(EnvironmentConfiguration::class)->setConstructorArgs([__DIR__ . '~Testing', 'vfs://Foo/', 255])->getMock();
    }