protected function NodeViewTest::setUp in Node Option Premium 8
Same name in this branch
- 8 tests/src/Functional/NodeViewTest.php \Drupal\Tests\nopremium\Functional\NodeViewTest::setUp()
- 8 tests/src/Kernel/NodeViewTest.php \Drupal\Tests\nopremium\Kernel\NodeViewTest::setUp()
Overrides NopremiumBrowserTestBase::setUp
File
- tests/
src/ Functional/ NodeViewTest.php, line 15
Class
- NodeViewTest
- Tests displaying nodes.
Namespace
Drupal\Tests\nopremium\FunctionalCode
protected function setUp() {
parent::setUp();
// Create a content type and enable premium for this type.
$this
->drupalCreateContentType([
'type' => 'foo',
]);
// Don't show body on teaser.
$this->container
->get('entity_type.manager')
->getStorage('entity_view_display')
->load('node.foo.teaser')
->removeComponent('body')
->save();
}