예제 #1
0
 /**
  * @dataProvider dataCreateStringLabel_invalidArgument
  * @expectedException \Craue\FormFlowBundle\Exception\InvalidTypeException
  */
 public function testCreateStringLabel_invalidArgument($value)
 {
     StepLabel::createStringLabel($value);
 }
예제 #2
0
 /**
  * @param string|StepLabel|null $label
  */
 public function setLabel($label)
 {
     if (is_string($label)) {
         $this->label = StepLabel::createStringLabel($label);
         return;
     }
     if ($label === null || $label instanceof StepLabel) {
         $this->label = $label;
         return;
     }
     throw new InvalidTypeException($label, array('null', 'string', 'Craue\\FormFlowBundle\\Form\\StepLabel'));
 }