Neos\Cache\Tests\Unit\Frontend\VariableFrontendTest::getByTagUsesIgBinaryIfAvailable PHP Method

getByTagUsesIgBinaryIfAvailable() public method

    public function getByTagUsesIgBinaryIfAvailable()
    {
        $tag = 'sometag';
        $identifiers = ['one', 'two'];
        $entries = ['one' => 'one value', 'two' => 'two value'];
        $backend = $this->prepareDefaultBackend();
        $backend->expects($this->once())->method('findIdentifiersByTag')->with($this->equalTo($tag))->will($this->returnValue($identifiers));
        $backend->expects($this->exactly(2))->method('get')->will($this->onConsecutiveCalls(igbinary_serialize('one value'), igbinary_serialize('two value')));
        $cache = new VariableFrontend('VariableFrontend', $backend);
        $cache->initializeObject();
        $this->assertEquals($entries, $cache->getByTag($tag), 'Did not receive the expected entries');
    }