public function testLabel() { $obj = new Source('test'); $obj->setLabel('TEST_LABEL'); $this->assertEquals('TEST_LABEL', $obj->getLabel()); $this->assertEquals('TEST_LABEL', $obj->__toString()); }
/** * @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(); }