Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
X
xmlsitemap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
xmlsitemap
Commits
c30e0f90
Commit
c30e0f90
authored
Aug 14, 2018
by
sjerdo
Committed by
pifagor
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2989571
by sjerdo, joegraduate, pifagor: Fix tests for 7.x-2.x-dev branch
parent
8d33ff93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
xmlsitemap_node/xmlsitemap_node.test
xmlsitemap_node/xmlsitemap_node.test
+8
-1
No files found.
xmlsitemap_node/xmlsitemap_node.test
View file @
c30e0f90
...
...
@@ -67,6 +67,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
$body_field
=
'body['
.
LANGUAGE_NONE
.
'][0][value]'
;
$node
=
$this
->
drupalCreateNode
(
array
(
'status'
=>
FALSE
,
'uid'
=>
$this
->
normal_user
->
uid
));
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'access'
=>
0
,
'status'
=>
1
,
...
...
@@ -86,6 +87,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
);
$this
->
drupalPost
(
'node/'
.
$node
->
nid
.
'/edit'
,
$edit
,
t
(
'Save'
));
$this
->
assertText
(
'Basic page Test node title has been updated.'
);
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'access'
=>
0
,
'status'
=>
1
,
...
...
@@ -106,6 +108,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
);
$this
->
drupalPost
(
'node/'
.
$node
->
nid
.
'/edit'
,
$edit
,
t
(
'Save'
));
$this
->
assertText
(
'Basic page Test node title has been updated.'
);
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'access'
=>
1
,
'status'
=>
0
,
...
...
@@ -121,6 +124,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
);
$this
->
drupalPost
(
'node/'
.
$node
->
nid
.
'/edit'
,
$edit
,
t
(
'Save'
));
$this
->
assertText
(
'Basic page Test node title has been updated.'
);
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'access'
=>
0
,
'status'
=>
1
,
...
...
@@ -137,6 +141,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
$this
->
drupalLogin
(
$this
->
admin_user
);
$node_old
=
$this
->
drupalCreateNode
();
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node_old
->
nid
,
array
(
'status'
=>
1
,
'priority'
=>
0.5
));
$edit
=
array
(
...
...
@@ -147,6 +152,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
$this
->
assertText
(
'The content type Basic page has been updated.'
);
$node
=
$this
->
drupalCreateNode
();
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'status'
=>
0
,
'priority'
=>
0.0
));
$this
->
assertSitemapLinkValues
(
'node'
,
$node_old
->
nid
,
array
(
'status'
=>
0
,
'priority'
=>
0.0
));
...
...
@@ -158,6 +164,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
$this
->
drupalPost
(
'admin/structure/types/manage/page'
,
$edit
,
t
(
'Save content type'
));
$this
->
assertText
(
'Changed the content type of 2 posts from page to page2.'
);
$this
->
assertText
(
'The content type Basic page has been updated.'
);
$this
->
cronRun
();
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
'subtype'
=>
'page2'
,
...
...
@@ -202,7 +209,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapTestHelper {
xmlsitemap_node_cron
();
for
(
$i
=
1
;
$i
<=
(
$limit
+
1
);
$i
++
)
{
$node
=
array_
pop
(
$nodes
);
$node
=
array_
shift
(
$nodes
);
if
(
$i
<=
$limit
)
{
// The first $limit nodes should be inserted.
$this
->
assertSitemapLinkValues
(
'node'
,
$node
->
nid
,
array
(
...
...
Write
Preview
Markdown
is supported
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