|
@@ -38,7 +38,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
public function testSetOptionWithUndefinedOption()
|
|
|
{
|
|
|
$this->expectException(InvalidConfigurationException::class);
|
|
|
- $this->expectExceptionMessageRegExp('/^Unknown option name: "foo"\.$/');
|
|
|
+ $this->expectExceptionMessageMatches('/^Unknown option name: "foo"\.$/');
|
|
|
|
|
|
$this->createConfigurationResolver(['foo' => 'bar']);
|
|
|
}
|
|
@@ -241,7 +241,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
public function testResolveConfigFileChooseFileWithInvalidFile()
|
|
|
{
|
|
|
$this->expectException(InvalidConfigurationException::class);
|
|
|
- $this->expectExceptionMessageRegExp(
|
|
|
+ $this->expectExceptionMessageMatches(
|
|
|
'#^The config file: ".+[\/\\\]Fixtures[\/\\\]ConfigurationResolverConfigFile[\/\\\]case_5[\/\\\]\.php_cs\.dist" does not return a "PhpCsFixer\\\ConfigInterface" instance\. Got: "string"\.$#'
|
|
|
);
|
|
|
|
|
@@ -255,7 +255,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
public function testResolveConfigFileChooseFileWithInvalidFormat()
|
|
|
{
|
|
|
$this->expectException(InvalidConfigurationException::class);
|
|
|
- $this->expectExceptionMessageRegExp('/^The format "xls" is not defined, supported are "checkstyle", "gitlab", "json", "junit", "txt", "xml"\.$/');
|
|
|
+ $this->expectExceptionMessageMatches('/^The format "xls" is not defined, supported are "checkstyle", "gitlab", "json", "junit", "txt", "xml"\.$/');
|
|
|
|
|
|
$dirBase = $this->getFixtureDir();
|
|
|
|
|
@@ -267,7 +267,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
public function testResolveConfigFileChooseFileWithPathArrayWithoutConfig()
|
|
|
{
|
|
|
$this->expectException(InvalidConfigurationException::class);
|
|
|
- $this->expectExceptionMessageRegExp('/^For multiple paths config parameter is required\.$/');
|
|
|
+ $this->expectExceptionMessageMatches('/^For multiple paths config parameter is required\.$/');
|
|
|
|
|
|
$dirBase = $this->getFixtureDir();
|
|
|
|
|
@@ -1127,7 +1127,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
]);
|
|
|
|
|
|
$this->expectException(\InvalidArgumentException::class);
|
|
|
- $this->expectExceptionMessageRegExp('#^"diff\-format" must be any of "null", "udiff", got "XXX"\.$#');
|
|
|
+ $this->expectExceptionMessageMatches('#^"diff\-format" must be any of "null", "udiff", got "XXX"\.$#');
|
|
|
|
|
|
$resolver->getDiffer();
|
|
|
}
|
|
@@ -1177,7 +1177,7 @@ final class ConfigurationResolverTest extends TestCase
|
|
|
$resolver = $this->createConfigurationResolver(['rules' => '']);
|
|
|
|
|
|
$this->expectException(InvalidConfigurationException::class);
|
|
|
- $this->expectExceptionMessageRegExp('/^Empty rules value is not allowed\.$/');
|
|
|
+ $this->expectExceptionMessageMatches('/^Empty rules value is not allowed\.$/');
|
|
|
|
|
|
$resolver->getRules();
|
|
|
}
|