function EditorIntegrationLoadingTest::setUp
Overrides BrowserTestBase::setUp
File
-
core/
modules/ quickedit/ tests/ src/ Functional/ EditorIntegrationLoadingTest.php, line 40
Class
- EditorIntegrationLoadingTest
- Tests Quick Edit module integration endpoints.
Namespace
Drupal\Tests\quickedit\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Create a text format.
$filtered_html_format = FilterFormat::create([
'format' => 'filtered_html',
'name' => 'Filtered HTML',
'weight' => 0,
'filters' => [
'filter_caption' => [
'status' => 1,
],
],
]);
$filtered_html_format->save();
// Create a node type.
$this->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
// Create one node of the above node type using the above text format.
$this->drupalCreateNode([
'type' => 'article',
'body' => [
0 => [
'value' => '<p>Do you also love Drupal?</p><img src="druplicon.png" data-caption="Druplicon" />',
'format' => 'filtered_html',
],
],
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.