Cache\Prefixed\Tests\PrefixedCachePoolTest::testSave PHP Method

testSave() public method

public testSave ( )
    public function testSave()
    {
        $item = $this->getMockBuilder(CacheItemInterface::class)->getMock();
        $prefix = 'ns';
        $returnValue = true;
        $stub = $this->getHierarchyCacheStub();
        $stub->expects($this->once())->method('save')->with($item)->willReturn($returnValue);
        $pool = new PrefixedCachePool($stub, $prefix);
        $this->assertEquals($returnValue, $pool->save($item));
    }