LayoutAttributeTest.php
Same filename and directory in other branches
Namespace
Drupal\Tests\Core\LayoutFile
-
core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutAttributeTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\Core\Layout;
use Drupal\Core\Layout\Attribute\Layout;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
/**
* Tests the Layout attribute.
*/
class LayoutAttributeTest extends UnitTestCase {
/**
* Test deprecating plugins without a label or category.
*/
public function testDeprecatedMissingProperties() : void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The "layout_without_label" layout plugin must have at least one of the label or deriver properties.');
new Layout('layout_without_label');
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| LayoutAttributeTest | Tests the Layout attribute. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.