Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
extlink-3172378
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
extlink-3172378
Commits
5da8f4d1
Commit
5da8f4d1
authored
6 years ago
by
Lachlan Ennis
Browse files
Options
Downloads
Patches
Plain Diff
Fix for broken tests
parent
c269b05d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extlink.test
+0
-46
0 additions, 46 deletions
extlink.test
with
0 additions
and
46 deletions
extlink.test
+
0
−
46
View file @
5da8f4d1
...
...
@@ -51,50 +51,6 @@ class ExtlinkBaseWebTestCase extends DrupalWebTestCase {
$this
->
adminUser
=
$this
->
drupalCreateUser
(
$permissions
);
}
/**
* Generate values for node forms.
*/
protected
function
getNodeFormValues
()
{
$edit
=
array
(
'title'
=>
'node_title '
.
$this
->
randomName
(
32
),
'body['
.
LANGUAGE_NONE
.
'][0][value]'
=>
'node_body '
.
$this
->
randomName
(
256
)
.
' <a href="http://google.com">Google!</a>'
,
);
return
$edit
;
}
/**
* Test if External Link is present.
*/
protected
function
assertExternalLinkPresence
()
{
$elements
=
$this
->
xpath
(
'//span[@class="ext"]'
);
if
(
count
(
$elements
)
>
0
)
{
$this
->
pass
(
'There should be an External Link on the form.'
,
'External Links'
);
}
else
{
$this
->
fail
(
'There should be an External Link on the form.'
,
'External Links'
);
}
}
}
/**
* Test Case for General External Links functionality.
*/
class
ExtlinkTestCase
extends
ExtlinkBaseWebTestCase
{
/**
* Get test info.
*/
public
static
function
getInfo
()
{
return
array
(
'name'
=>
t
(
'General External Links functionality'
),
'description'
=>
t
(
'Testing the basic functionality of External Links'
),
'group'
=>
t
(
'External Links'
),
);
}
}
/**
* Test Case for External Links administration functionality.
*/
...
...
@@ -117,12 +73,10 @@ class ExtlinkAdminTestCase extends ExtlinkBaseWebTestCase {
public
function
testAdminAccess
()
{
$this
->
drupalLogin
(
$this
->
normalUser
);
$this
->
drupalGet
(
self
::
EXTLINK_ADMIN_PATH
);
file_put_contents
(
'tmp.simpletest.html'
,
$this
->
drupalGetContent
());
$this
->
assertText
(
t
(
'Access denied'
),
'Normal users should not be able to access the External Links admin pages'
,
'External Links'
);
$this
->
drupalLogin
(
$this
->
adminUser
);
$this
->
drupalGet
(
self
::
EXTLINK_ADMIN_PATH
);
file_put_contents
(
'tmp.simpletest.html'
,
$this
->
drupalGetContent
());
$this
->
assertNoText
(
t
(
'Access denied'
),
'Admin users should be able to access the External Links admin pages'
,
'External Links'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment