function ConfigActionTest::testMissingAction

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php \Drupal\KernelTests\Core\Config\Action\ConfigActionTest::testMissingAction()

See also

\Drupal\Core\Config\Action\ConfigActionManager

File

core/tests/Drupal/KernelTests/Core/Config/Action/ConfigActionTest.php, line 318

Class

ConfigActionTest
Tests the config action system.

Namespace

Drupal\KernelTests\Core\Config\Action

Code

public function testMissingAction() : void {
    $this->expectException(PluginNotFoundException::class);
    $this->expectExceptionMessageMatches('/^The "does_not_exist" plugin does not exist/');
    $this->container
        ->get('plugin.manager.config_action')
        ->applyAction('does_not_exist', 'config_test.system', [
        'foo' => 'Yay!',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.