Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
link
Commits
d6141aa7
Commit
d6141aa7
authored
Aug 31, 2021
by
damienmckenna
Committed by
Damien McKenna
Aug 31, 2021
Browse files
Issue #3230624 by DamienMcKenna: Change test permission handling.
parent
d0b06ddd
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.txt
View file @
d6141aa7
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
...
...
tests/LinkBaseTestClass.test
View file @
d6141aa7
...
...
@@ -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'
,
);
/**
...
...
tests/LinkFieldAttributesTest.test
View file @
d6141aa7
...
...
@@ -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
);
}
...
...
tests/LinkPathPrefixesTest.test
View file @
d6141aa7
...
...
@@ -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'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment