function EntityCloneConfigActionTest::testErrorIfOriginalDoesNotExist

Tests error if original entity does not exist.

File

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

Class

EntityCloneConfigActionTest
@covers \Drupal\Core\Config\Action\Plugin\ConfigAction\EntityClone @group Recipe

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.