/** * @dataProvider dataCreateStringLabel_invalidArgument * @expectedException \Craue\FormFlowBundle\Exception\InvalidTypeException */ public function testCreateStringLabel_invalidArgument($value) { StepLabel::createStringLabel($value); }
/** * @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')); }