Ejemplo n.º 1
0
 public function testGetIdAndData()
 {
     $expected = array('Bar' => new \stdClass());
     $instance = new Container('Foo', $expected);
     $this->assertEquals('Foo', $instance->getId());
     $this->assertEquals($expected, $instance->getData());
     $this->assertFalse($instance->isEmpty());
 }
Ejemplo n.º 2
0
 /**
  * @since 1.0
  *
  * @param Container $container
  */
 public function save(Container $container)
 {
     $this->internalCache->save($container->getId(), $container->getData(), $container->getExpiry());
     $this->cache->save($container->getId(), serialize($container->getData()), $container->getExpiry());
     unset($container);
 }