ConfigActionAttributeTest.php
Same filename and directory in other branches
Namespace
Drupal\Tests\Core\Config\ActionFile
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Action/ ConfigActionAttributeTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\Core\Config\Action;
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
use Drupal\Core\Config\Action\Attribute\ConfigAction;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
/**
* Tests Drupal\Core\Config\Action\Attribute\ConfigAction.
*/
class ConfigActionAttributeTest extends UnitTestCase {
/**
* Tests no label no deriver.
*
* @legacy-covers ::__construct
*/
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');
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| ConfigActionAttributeTest | Tests Drupal\Core\Config\Action\Attribute\ConfigAction. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.