protected function EntityRedirectTest::setUp in Entity Redirect 8.2
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ EntityRedirectTest.php, line 39
Class
- EntityRedirectTest
- Provide basic setup for all color field functional tests.
Namespace
Drupal\Tests\entity_redirect\FunctionalCode
protected function setUp() {
parent::setUp();
$this->nodeType = $this
->drupalCreateContentType([
'type' => 'article',
]);
$this->settings = [
'edit' => [
'active' => TRUE,
'destination' => 'url',
'url' => '/user/2',
],
'add' => [
'active' => FALSE,
'destination' => 'external',
'external' => 'https://google.ca',
'url' => '/user/2/',
],
];
$this->nodeType
->setThirdPartySetting('entity_redirect', 'redirect', $this->settings)
->save();
$this
->drupalLogin($this
->drupalCreateUser([
'create article content',
'edit own article content',
]));
}