public function CacheTest::testFetchMultipleObjects in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php \Doctrine\Tests\Common\Cache\CacheTest::testFetchMultipleObjects()
Check to see that objects fetched via fetchMultiple are properly unserialized
1 method overrides CacheTest::testFetchMultipleObjects()
- PhpFileCacheTest::testFetchMultipleObjects in vendor/doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ PhpFileCacheTest.php 
- Check to see that objects fetched via fetchMultiple are properly unserialized
File
- vendor/doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ CacheTest.php, line 339 
Class
Namespace
Doctrine\Tests\Common\CacheCode
public function testFetchMultipleObjects() {
  $cache = $this
    ->_getCacheDriver();
  $cache
    ->deleteAll();
  $obj1 = new \stdClass();
  $obj1->foo = "bar";
  $cache
    ->save("obj1", $obj1);
  $obj2 = new \stdClass();
  $obj2->bar = "baz";
  $cache
    ->save("obj2", $obj2);
  $fetched = $cache
    ->fetchMultiple(array(
    "obj1",
    "obj2",
  ));
  $this
    ->assertInstanceOf("stdClass", $fetched["obj1"]);
  $this
    ->assertInstanceOf("stdClass", $fetched["obj2"]);
  $this
    ->assertEquals("bar", $fetched["obj1"]->foo);
  $this
    ->assertEquals("baz", $fetched["obj2"]->bar);
}