function ConfigActionAttributeTest::testNoLabelNoDeriver

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Config/Action/ConfigActionAttributeTest.php \Drupal\Tests\Core\Config\Action\ConfigActionAttributeTest::testNoLabelNoDeriver()
  2. 10 core/tests/Drupal/Tests/Core/Config/Action/ConfigActionAttributeTest.php \Drupal\Tests\Core\Config\Action\ConfigActionAttributeTest::testNoLabelNoDeriver()

Tests no label no deriver.

@legacy-covers ::__construct

File

core/tests/Drupal/Tests/Core/Config/Action/ConfigActionAttributeTest.php, line 25

Class

ConfigActionAttributeTest
Tests Drupal\Core\Config\Action\Attribute\ConfigAction.

Namespace

Drupal\Tests\Core\Config\Action

Code

public function testNoLabelNoDeriver() : void {
  $this->expectException(InvalidPluginDefinitionException::class);
  $this->expectExceptionMessage("The 'test' config action plugin must have either an admin label or a deriver");
  new ConfigAction('test');
}

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