update
This commit is contained in:
@@ -57,11 +57,19 @@ class ContactPersonalTest extends BrowserTestBase {
|
||||
parent::setUp();
|
||||
|
||||
// Create an admin user.
|
||||
$this->adminUser = $this->drupalCreateUser(['administer contact forms', 'administer users', 'administer account settings', 'access site reports']);
|
||||
$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->webUser = $this->drupalCreateUser([
|
||||
'access user profiles',
|
||||
'access user contact forms',
|
||||
]);
|
||||
$this->contactUser = $this->drupalCreateUser();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,9 @@ class ContactSitewideTest extends BrowserTestBase {
|
||||
*/
|
||||
public function testSiteWideContact() {
|
||||
// Tests name and email fields for authenticated and anonymous users.
|
||||
$this->drupalLogin($this->drupalCreateUser(['access site-wide contact form']));
|
||||
$this->drupalLogin($this->drupalCreateUser([
|
||||
'access site-wide contact form',
|
||||
]));
|
||||
$this->drupalGet('contact');
|
||||
|
||||
// Ensure that there is no textfield for name.
|
||||
|
||||
Reference in New Issue
Block a user