Esempio n. 1
0
 public function testNoCacheImplementationMapping()
 {
     $food = new BehavioralCategory();
     $food->setTitle('Food');
     $this->em->persist($food);
     $this->em->flush();
     // assertion checks if configuration is read correctly without cache driver
     $conf = $this->timestampable->getConfiguration($this->em, self::TEST_ENTITY_CATEGORY);
     $this->assertCount(0, $conf);
 }
 private function populate()
 {
     $root = new BehavioralCategory();
     $root->setTitle("Food");
     $root2 = new BehavioralCategory();
     $root2->setTitle("Sports");
     $child = new BehavioralCategory();
     $child->setTitle("Fruits");
     $child->setParent($root);
     $child2 = new BehavioralCategory();
     $child2->setTitle("Vegitables");
     $child2->setParent($root);
     $childsChild = new BehavioralCategory();
     $childsChild->setTitle("Carrots");
     $childsChild->setParent($child2);
     $potatoes = new BehavioralCategory();
     $potatoes->setTitle("Potatoes");
     $potatoes->setParent($child2);
     $this->em->persist($root);
     $this->em->persist($root2);
     $this->em->persist($child);
     $this->em->persist($child2);
     $this->em->persist($childsChild);
     $this->em->persist($potatoes);
     $this->em->flush();
     $this->em->clear();
 }