function QuickEditLoadingTest::testDisplayOptions
Same name in this branch
- 8.9.x core/modules/quickedit/tests/src/Kernel/QuickEditLoadingTest.php \Drupal\Tests\quickedit\Kernel\QuickEditLoadingTest::testDisplayOptions()
Same name in other branches
- 9 core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php \Drupal\Tests\quickedit\FunctionalJavascript\QuickEditLoadingTest::testDisplayOptions()
- 9 core/modules/quickedit/tests/src/Kernel/QuickEditLoadingTest.php \Drupal\Tests\quickedit\Kernel\QuickEditLoadingTest::testDisplayOptions()
Tests that Quick Edit doesn't make fields rendered with display options editable.
File
-
core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditLoadingTest.php, line 254
Class
- QuickEditLoadingTest
- Tests loading of in-place editing functionality and lazy loading of its in-place editors.
Namespace
Drupal\Tests\quickedit\FunctionalJavascriptCode
public function testDisplayOptions() {
$node = Node::load('1');
$display_settings = [
'label' => 'inline',
];
$build = $node->body
->view($display_settings);
$output = \Drupal::service('renderer')->renderRoot($build);
$this->assertStringNotContainsString('data-quickedit-field-id', $output, 'data-quickedit-field-id attribute not added when rendering field using dynamic display options.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.