Example #1
0
 public function testLabel()
 {
     $obj = new Source('test');
     $obj->setLabel('TEST_LABEL');
     $this->assertEquals('TEST_LABEL', $obj->getLabel());
     $this->assertEquals('TEST_LABEL', $obj->__toString());
 }
Example #2
0
 /**
  * @param \Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->data as $sourceName => $sourceLabel) {
         $source = new Source($sourceName);
         $source->setLabel($sourceLabel);
         $manager->persist($source);
     }
     $manager->flush();
 }