function NodeSearchTest::setUp
Overrides KernelTestBase::setUp
File
-
core/
modules/ node/ tests/ src/ Kernel/ NodeSearchTest.php, line 35
Class
- NodeSearchTest
- Tests node search integration.
Namespace
Drupal\Tests\node\KernelCode
protected function setUp() : void {
parent::setUp();
$this->installSchema('node', 'node_access');
$this->installEntitySchema('user');
$this->installEntitySchema('node');
$this->installSchema('search', [
'search_index',
'search_dataset',
'search_total',
]);
$this->installConfig([
'search',
'system',
]);
$type = NodeType::create([
'type' => 'article',
'name' => 'Article',
]);
$type->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.