예제 #1
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $faker = Factory::create();
     for ($i = 0; $i < 10; $i++) {
         $project = new Project();
         $project->setName($faker->sentence(6));
         $project->setDescription($faker->paragraph(2));
         $project->setCompany($this->getReference('company-' . $faker->numberBetween(0, 9)));
         $project->setEmployee($this->getReference('employee-' . $faker->numberBetween(0, 9)));
         $project->setStatus($this->getReference('project-status-' . $i));
         $this->addReference('project-' . $i, $project);
         $manager->persist($project);
     }
     $manager->flush();
 }
예제 #2
0
 public function testSetName()
 {
     $project = new Project();
     $project->setName('Google Glass');
     $this->assertEquals('Google Glass', $project->getName());
 }