function RowPluginTest::setUp
Same name in other branches
- 8.9.x core/modules/node/tests/src/Functional/Views/RowPluginTest.php \Drupal\Tests\node\Functional\Views\RowPluginTest::setUp()
- 10 core/modules/node/tests/src/Kernel/Views/RowPluginTest.php \Drupal\Tests\node\Kernel\Views\RowPluginTest::setUp()
- 11.x core/modules/node/tests/src/Kernel/Views/RowPluginTest.php \Drupal\Tests\node\Kernel\Views\RowPluginTest::setUp()
Overrides NodeTestBase::setUp
File
-
core/
modules/ node/ tests/ src/ Functional/ Views/ RowPluginTest.php, line 44
Class
- RowPluginTest
- Tests the node row plugin.
Namespace
Drupal\Tests\node\Functional\ViewsCode
protected function setUp($import_test_views = TRUE, $modules = [
'node_test_views',
]) : void {
parent::setUp($import_test_views, $modules);
$this->drupalCreateContentType([
'type' => 'article',
]);
// Create two nodes.
for ($i = 0; $i < 2; $i++) {
$this->nodes[] = $this->drupalCreateNode([
'type' => 'article',
'body' => [
[
'value' => $this->randomMachineName(42),
'format' => filter_default_format(),
'summary' => $this->randomMachineName(),
],
],
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.