/**
  * @test
  * @requires extension igbinary
  */
 public function getByTagUsesIgBinaryIfAvailable()
 {
     $tag = 'sometag';
     $identifiers = array('one', 'two');
     $entries = array('one' => 'one value', 'two' => 'two value');
     $backend = $this->getMock(\TYPO3\Flow\Cache\Backend\AbstractBackend::class, array('get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'), array(), '', false);
     $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 \TYPO3\Flow\Cache\Frontend\VariableFrontend('VariableFrontend', $backend);
     $cache->initializeObject();
     $this->assertEquals($entries, $cache->getByTag($tag), 'Did not receive the expected entries');
 }
 /**
  * @test
  */
 public function getByTagUsesIgBinaryIfAvailable()
 {
     if (!extension_loaded('igbinary')) {
         $this->markTestSkipped('Cannot test igbinary support, because igbinary is not installed.');
     }
     $tag = 'sometag';
     $identifiers = array('one', 'two');
     $entries = array('one' => 'one value', 'two' => 'two value');
     $backend = $this->getMock('TYPO3\\Flow\\Cache\\Backend\\AbstractBackend', array('get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'flush', 'flushByTag', 'collectGarbage'), array(), '', FALSE);
     $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 \TYPO3\Flow\Cache\Frontend\VariableFrontend('VariableFrontend', $backend);
     $cache->initializeObject();
     $this->assertEquals($entries, $cache->getByTag($tag), 'Did not receive the expected entries');
 }