'foo'
],
['0'
],
[0
],
];
} /**
* @dataProvider getValidNames
*/
public function testValidNames($name) { $this->
assertInstanceOf(ButtonBuilder::
class,
new ButtonBuilder($name));
} public function testNameContainingIllegalCharacters() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('The name "button[]" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").'
);
$this->
assertInstanceOf(ButtonBuilder::
class,
new ButtonBuilder('button[]'
));
} public static function getInvalidNames() {