コード例 #1
0
ファイル: MethodTest.php プロジェクト: antrampa/crm
 public function testLabel()
 {
     $obj = new Method('test');
     $obj->setLabel('TEST_LABEL');
     $this->assertEquals('TEST_LABEL', $obj->getLabel());
     $this->assertEquals('TEST_LABEL', $obj->__toString());
 }
コード例 #2
0
ファイル: LoadMethodData.php プロジェクト: antrampa/crm
 /**
  * @param \Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->data as $methodName => $methodLabel) {
         $method = new Method($methodName);
         $method->setLabel($methodLabel);
         $manager->persist($method);
     }
     $manager->flush();
 }