Cache\Hierarchy\Tests\HierarchicalCachePoolTest::testGetHierarchyKeyEmptyCache PHP Method

testGetHierarchyKeyEmptyCache() public method

    public function testGetHierarchyKeyEmptyCache()
    {
        $pool = new CachePool();
        $path = null;
        $result = $pool->exposeGetHierarchyKey('key', $path);
        $this->assertEquals('key', $result);
        $this->assertNull($path);
        $result = $pool->exposeGetHierarchyKey('|foo|bar', $path);
        $this->assertEqualsSha1('root!!!foo!!!bar!!!', $result);
        $this->assertEqualsSha1('path!root!!!foo!!!bar!', $path);
        $result = $pool->exposeGetHierarchyKey('|', $path);
        $this->assertEqualsSha1('path!root!', $path);
        $this->assertEqualsSha1('root!!!', $result);
    }