function EntityCloneConfigActionTest::testErrorIfOriginalDoesNotExist

Tests error if original entity does not exist.

File

core/tests/Drupal/KernelTests/Core/Recipe/EntityCloneConfigActionTest.php, line 45

Class

EntityCloneConfigActionTest
Tests Entity Clone Config Action.

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function testErrorIfOriginalDoesNotExist() : void {
  $this->expectException(ConfigActionException::class);
  $this->expectExceptionMessage("Cannot clone 'user.role.nope' because it does not exist.");
  $this->container
    ->get('plugin.manager.config_action')
    ->applyAction('cloneAs', 'user.role.nope', 'user.role.yep');
}

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