Esempio n. 1
0
 private function populate()
 {
     $em = $this->getMockSqliteEntityManager();
     $summer = new Article();
     $summer->setTitle('summer');
     $winter = new Article();
     $winter->setTitle('winter');
     $autumn = new Article();
     $autumn->setTitle('autumn');
     $spring = new Article();
     $spring->setTitle('spring');
     $em->persist($summer);
     $em->persist($winter);
     $em->persist($autumn);
     $em->persist($spring);
     $em->flush();
 }
Esempio n. 2
0
 private function populateNumeric($em)
 {
     $zero = new Article();
     $zero->setTitle('0');
     $zero->setEnabled(true);
     $one = new Article();
     $one->setTitle('1');
     $one->setEnabled(true);
     $lower = new Article();
     $lower->setTitle('123');
     $lower->setEnabled(false);
     $upper = new Article();
     $upper->setTitle('234');
     $upper->setEnabled(false);
     $em->persist($zero);
     $em->persist($one);
     $em->persist($lower);
     $em->persist($upper);
     $em->flush();
 }
Esempio n. 3
0
 private function populate($em)
 {
     $summer = new Article();
     $summer->setTitle('summer');
     $winter = new Article();
     $winter->setTitle('winter');
     $autumn = new Article();
     $autumn->setTitle('autumn');
     $spring = new Article();
     $spring->setTitle('spring');
     $em->persist($summer);
     $em->persist($winter);
     $em->persist($autumn);
     $em->persist($spring);
     $em->flush();
 }