public function PreviewLinkTest::setUp in Preview Link 8
Same name and namespace in other branches
- 2.x tests/src/Functional/PreviewLinkTest.php \Drupal\Tests\preview_link\Functional\PreviewLinkTest::setUp()
- 2.0.x tests/src/Functional/PreviewLinkTest.php \Drupal\Tests\preview_link\Functional\PreviewLinkTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ PreviewLinkTest.php, line 51
Class
- PreviewLinkTest
- Integration test for the preview link.
Namespace
Drupal\Tests\preview_link\FunctionalCode
public function setUp() {
parent::setUp();
$this->admin = $this
->createUser([
'generate preview links',
]);
$this
->createContentType([
'type' => 'page',
]);
$this->node = $this
->createNode([
'status' => NodeInterface::NOT_PUBLISHED,
]);
\Drupal::configFactory()
->getEditable('preview_link.settings')
->set('enabled_entity_types', [
'node' => [
'page',
],
'entity_test_revpub' => [
'entity_test_revpub',
],
])
->save();
}