function QuickEditLoadingTest::testDisplayOptions
Same name in this branch
- 9 core/modules/quickedit/tests/src/Kernel/QuickEditLoadingTest.php \Drupal\Tests\quickedit\Kernel\QuickEditLoadingTest::testDisplayOptions()
Same name in other branches
- 8.9.x core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditLoadingTest.php \Drupal\Tests\quickedit\FunctionalJavascript\QuickEditLoadingTest::testDisplayOptions()
- 8.9.x core/modules/quickedit/tests/src/Kernel/QuickEditLoadingTest.php \Drupal\Tests\quickedit\Kernel\QuickEditLoadingTest::testDisplayOptions()
Tests rendering of fields with editable display options.
File
-
core/
modules/ quickedit/ tests/ src/ FunctionalJavascript/ QuickEditLoadingTest.php, line 253
Class
- QuickEditLoadingTest
- Tests loading of in-place editing and lazy loading of 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.