|
@@ -505,7 +505,7 @@ echo 1;'
|
|
|
public function testMisconfiguration($configuration, $exceptionMessage)
|
|
|
{
|
|
|
$this->expectException(\PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException::class);
|
|
|
- $this->expectExceptionMessage('[header_comment] '.$exceptionMessage);
|
|
|
+ $this->expectExceptionMessageRegExp("#^\\[header_comment\\] {$exceptionMessage}$#");
|
|
|
|
|
|
$this->configureFixerWithAliasedOptions($configuration);
|
|
|
}
|
|
@@ -516,35 +516,35 @@ echo 1;'
|
|
|
[[], 'Missing required configuration: The required option "header" is missing.'],
|
|
|
[
|
|
|
['header' => 1],
|
|
|
- 'Invalid configuration: The option "header" with value 1 is expected to be of type "string", but is of type "integer".',
|
|
|
+ 'Invalid configuration: The option "header" with value 1 is expected to be of type "string", but is of type "(int|integer)"\.',
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
'header' => '',
|
|
|
'comment_type' => 'foo',
|
|
|
],
|
|
|
- 'Invalid configuration: The option "comment_type" with value "foo" is invalid. Accepted values are: "PHPDoc", "comment".',
|
|
|
+ 'Invalid configuration: The option "comment_type" with value "foo" is invalid\. Accepted values are: "PHPDoc", "comment"\.',
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
'header' => '',
|
|
|
'comment_type' => new \stdClass(),
|
|
|
],
|
|
|
- 'Invalid configuration: The option "comment_type" with value stdClass is invalid. Accepted values are: "PHPDoc", "comment".',
|
|
|
+ 'Invalid configuration: The option "comment_type" with value stdClass is invalid\. Accepted values are: "PHPDoc", "comment"\.',
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
'header' => '',
|
|
|
'location' => new \stdClass(),
|
|
|
],
|
|
|
- 'Invalid configuration: The option "location" with value stdClass is invalid. Accepted values are: "after_open", "after_declare_strict".',
|
|
|
+ 'Invalid configuration: The option "location" with value stdClass is invalid\. Accepted values are: "after_open", "after_declare_strict"\.',
|
|
|
],
|
|
|
[
|
|
|
[
|
|
|
'header' => '',
|
|
|
'separate' => new \stdClass(),
|
|
|
],
|
|
|
- 'Invalid configuration: The option "separate" with value stdClass is invalid. Accepted values are: "both", "top", "bottom", "none".',
|
|
|
+ 'Invalid configuration: The option "separate" with value stdClass is invalid\. Accepted values are: "both", "top", "bottom", "none"\.',
|
|
|
],
|
|
|
];
|
|
|
}
|