/** * {@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(); }
public function testSetDescription() { $project = new Project(); $project->setDescription('A wearable android glass'); $this->assertEquals('A wearable android glass', $project->getDescription()); }