public function SmartReadMoreLinkTest::setUp in Smart read more link 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ SmartReadMoreLinkTest.php, line 27
Class
- SmartReadMoreLinkTest
- Functional tests of smart_read_more_link module.
Namespace
Drupal\Tests\smart_read_more_link\FunctionalCode
public function setUp() {
parent::setUp();
$data = [
'format' => 'full_html',
'name' => 'Full HTML',
'weight' => 2,
];
$ff = $this->container
->get('entity_type.manager')
->getStorage('filter_format')
->create($data);
$ff
->save();
// Create an article content type that we will use for testing.
$type = $this->container
->get('entity_type.manager')
->getStorage('node_type')
->create([
'type' => 'article',
'name' => 'Article',
]);
$type
->save();
node_add_body_field($type);
$this->container
->get('router.builder')
->rebuild();
$this
->configureField();
}