예제 #1
0
 public function load(ObjectManager $manager)
 {
     $school1 = new School();
     $school1->setName('Gimse');
     $school1->setContactPerson('Per Olsen');
     $school1->setEmail('*****@*****.**');
     $school1->setPhone('99887722');
     $school2 = new School();
     $school2->setName('Selsbakk');
     $school2->setContactPerson('Vibeke Hansen');
     $school2->setEmail('*****@*****.**');
     $school2->setPhone('22386722');
     $school3 = new School();
     $school3->setName('Blussuvoll');
     $school3->setContactPerson('Kari Johansen');
     $school3->setEmail('*****@*****.**');
     $school3->setPhone('22386722');
     $school3->setInternational(true);
     $manager->persist($school1);
     $manager->persist($school2);
     $manager->persist($school3);
     $manager->flush();
     $this->addReference('school-1', $school1);
     $this->addReference('school-2', $school2);
     $this->addReference('school-3', $school3);
 }
예제 #2
0
 public function testSetEmail()
 {
     // new entity
     $school = new School();
     // Use the setEmail method
     $school->setEmail("*****@*****.**");
     // Assert the result
     $this->assertEquals("*****@*****.**", $school->getEmail());
 }