public function testSetSchool() { // new assistantHistory entity $assistantHistory = new AssistantHistory(); // new school entity $school = new School(); // Set some random datat to the entity $school->setName("Heggen"); // Set the entity to assistantHistory $assistantHistory->setSchool($school); // Assert the result $this->assertEquals($school->getName(), $assistantHistory->getSchool()->getName()); }
public function load(ObjectManager $manager) { $ah1 = new AssistantHistory(); $ah1->setUser($this->getReference('user-1')); $ah1->setSchool($this->getReference('school-1')); $ah1->setSemester($this->getReference('semester-1')); $ah1->setWorkdays(4); $ah1->setBolk('Bolk 2'); $ah1->setDay("Onsdag"); $manager->persist($ah1); $manager->flush(); $this->addReference('ah-1', $ah1); }