protected function ContactPersonalTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/contact/tests/src/Functional/ContactPersonalTest.php \Drupal\Tests\contact\Functional\ContactPersonalTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ contact/ tests/ src/ Functional/ ContactPersonalTest.php, line 57
Class
- ContactPersonalTest
- Tests personal contact form functionality.
Namespace
Drupal\Tests\contact\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Create an admin user.
$this->adminUser = $this
->drupalCreateUser([
'administer contact forms',
'administer users',
'administer account settings',
'access site reports',
]);
// Create some normal users with their contact forms enabled by default.
$this
->config('contact.settings')
->set('user_default_enabled', TRUE)
->save();
$this->webUser = $this
->drupalCreateUser([
'access user profiles',
'access user contact forms',
]);
$this->contactUser = $this
->drupalCreateUser();
}