Neos\Flow\Tests\Unit\Cache\CacheManagerTest::managerThrowsExceptionOnCacheRegistrationWithAlreadyExistingIdentifier PHP Method

managerThrowsExceptionOnCacheRegistrationWithAlreadyExistingIdentifier() public method

    public function managerThrowsExceptionOnCacheRegistrationWithAlreadyExistingIdentifier()
    {
        $cache1 = $this->getMockBuilder(Cache\Frontend\AbstractFrontend::class)->disableOriginalConstructor()->getMock();
        $cache1->expects($this->atLeastOnce())->method('getIdentifier')->will($this->returnValue('test'));
        $cache2 = $this->getMockBuilder(Cache\Frontend\AbstractFrontend::class)->disableOriginalConstructor()->getMock();
        $cache2->expects($this->atLeastOnce())->method('getIdentifier')->will($this->returnValue('test'));
        $this->cacheManager->registerCache($cache1);
        $this->cacheManager->registerCache($cache2);
    }