function ConfigLocaleOverride::testInvalidContextName

Tests config_context_enter() invalid context name handling.

File

drupal/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverride.php, line 217
Contains \Drupal\config\Tests\ConfigLocaleOverride.

Class

ConfigLocaleOverride
Tests locale config override.

Namespace

Drupal\config\Tests

Code

function testInvalidContextName() {
  $message = 'Expected ConfigException was thrown for an invalid context_name argument.';
  try {
    config_context_enter('invalid.config.context');
    $this
      ->fail($message);
  } catch (ConfigException $e) {
    $this
      ->pass($message);
  }
}