Пример #1
0
 /**
  * @dataProvider getSetDataProvider
  */
 public function testGetSet($property, $value, $expected)
 {
     $directionName = 'forward';
     $obj = new CallDirection($directionName);
     $this->assertEquals($directionName, $obj->getName());
     call_user_func_array(array($obj, 'set' . ucfirst($property)), array($value));
     $this->assertEquals($expected, call_user_func_array(array($obj, 'get' . ucfirst($property)), array()));
 }
Пример #2
0
 /**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->data as $name => $label) {
         $callDirection = new CallDirection($name);
         $callDirection->setLabel($label);
         $manager->persist($callDirection);
     }
     $manager->flush();
 }