function BlockContentTest::testBlockContentType
Tests BlockContentType functionality.
File
-
core/
modules/ block_content/ tests/ src/ Kernel/ BlockContentTest.php, line 45
Class
- BlockContentTest
- Tests the block content.
Namespace
Drupal\Tests\block_content\KernelCode
public function testBlockContentType() : void {
$type = BlockContentType::create([
'id' => 'foo',
'label' => 'Foo',
]);
$this->assertSame('', $type->getDescription());
$type->setDescription('Test description');
$this->assertSame('Test description', $type->getDescription());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.