public function ViewModeTest::testDescription in Lightning Layout 8
Tests that the Panelizer field widget shows view mode descriptions.
File
- tests/
src/ Functional/ ViewModeTest.php, line 74
Class
- ViewModeTest
- @group lightning_layout
Namespace
Drupal\Tests\lightning_layout\FunctionalCode
public function testDescription() {
$view_mode = EntityViewMode::load('node.full');
$this
->assertInstanceOf(EntityViewMode::class, $view_mode);
$description = $this
->getRandomGenerator()
->sentences(4);
$view_mode
->setThirdPartySetting('lightning_core', 'description', $description);
$this
->assertSame(SAVED_UPDATED, $view_mode
->save());
$account = $this
->drupalCreateUser([
'create landing_page content',
]);
$this
->drupalLogin($account);
$this
->drupalGet('/node/add/landing_page');
$this
->assertSession()
->pageTextContains($description);
}