public function testPopulateFromEntities() { // test populating cache from set of entities $this->obj1->setMetadata($this->name, $this->value); $this->obj1->setMetadata($this->name, 4, 'integer', true); $this->obj1->setMetadata("{$this->name}-2", "{$this->value}-2"); $this->obj2->setMetadata($this->name, $this->value); $this->cache->clearAll(); $this->cache->populateFromEntities(array($this->guid1, $this->guid2)); $this->assertIdentical($this->cache->getSingle($this->guid1, $this->name), [$this->value, 4]); $this->assertIdentical($this->cache->getSingle($this->guid1, "{$this->name}-2"), "{$this->value}-2"); $this->assertIdentical($this->cache->getSingle($this->guid2, $this->name), $this->value); }