Commit d6141aa7 authored by damienmckenna's avatar damienmckenna Committed by Damien McKenna
Browse files

Issue #3230624 by DamienMcKenna: Change test permission handling.

parent d0b06ddd
Link 7.x-1.x-dev, xxxx-xx-xx
----------------------------
#3210438 by DamienMcKenna: Test coverage - URLs with multiple query parameters.
#3230624 by DamienMcKenna: Change test permission handling.
Link 7.x-1.9, 2021-04-19
......
......@@ -16,15 +16,15 @@ class LinkBaseTestClass extends DrupalWebTestCase {
* @var array
*/
protected $permissions = array(
'access content',
'administer content types',
'administer fields',
'administer nodes',
'administer filters',
'access comments',
'post comments',
'access administration pages',
'create page content',
'access content' => 'access content',
'administer content types' => 'administer content types',
'administer fields' => 'administer fields',
'administer nodes' => 'administer nodes',
'administer filters' => 'administer filters',
'access comments' => 'access comments',
'post comments' => 'post comments',
'access administration pages' => 'access administration pages',
'create page content' => 'create page content',
);
/**
......
......@@ -118,7 +118,8 @@ class LinkFieldAttributesTest extends LinkBaseTestClass {
// Now that we have a new content type, create a user that has privileges
// on the content type.
$permissions = array_merge($this->permissions, array($permission));
$permissions = $this->permissions;
$permissions[$permission] = $permission;
$this->web_user = $this->drupalCreateUser($permissions);
$this->drupalLogin($this->web_user);
......@@ -196,7 +197,8 @@ class LinkFieldAttributesTest extends LinkBaseTestClass {
// Now that we have a new content type, create a user that has privileges
// on the content type.
$permissions = array_merge($this->permissions, array($permission));
$permissions = $this->permissions;
$permissions[$permission] = $permission;
$this->web_user = $this->drupalCreateUser($permissions);
$this->drupalLogin($this->web_user);
}
......
......@@ -25,10 +25,8 @@ class LinkPathPrefixesTest extends LinkBaseTestClass {
* {@inheritdoc}
*/
public function setUp(array $modules = array()) {
$this->permissions = array_merge($this->permissions, array(
'administer site configuration',
'administer languages',
));
$this->permissions['administer site configuration'] = 'administer site configuration';
$this->permissions['administer languages'] = 'administer languages';
$modules[] = 'locale';
$modules[] = 'locale_test';
$modules[] = 'translation';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment