You are here

public function ConfigIgnorePatternResolverTest::testInvalidPattern in Config Ignore 8.3

Tests the config ignore pattern resolver with an invalid patterns.

@covers ::getIgnoredConfigs @dataProvider dataProviderTestInvalidPattern

Parameters

string $pattern: The pattern to be tested.

string $expected_exception_message: The expected exception message.

Throws

\ReflectionException If the class does not exist.

File

tests/src/Unit/ConfigIgnorePatternResolverTest.php, line 35

Class

ConfigIgnorePatternResolverTest
Tests the config ignore pattern resolver.

Namespace

Drupal\Tests\config_ignore\Unit

Code

public function testInvalidPattern($pattern, $expected_exception_message) {
  $this
    ->expectException(\LogicException::class);
  $this
    ->expectExceptionMessage($expected_exception_message);
  $this
    ->getIgnoredConfigs([
    $pattern,
  ], [
    'foo.bar',
  ]);
}