Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
simple_sitemap
Commits
1dea3b64
Commit
1dea3b64
authored
Mar 19, 2016
by
Sam Becker
Committed by
Pawel G
Mar 19, 2016
Browse files
Issue
#2685407
by Sam152: Fix tests in HEAD
parent
134f4ee0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Tests/SimplesitemapTest.php
View file @
1dea3b64
...
...
@@ -13,7 +13,7 @@ use Drupal\simpletest\WebTestBase;
/**
* Tests Simple XML sitemap integration.
*
* @group
S
implesitemap
* @group
s
imple
_
sitemap
*/
class
SimplesitemapTest
extends
WebTestBase
{
...
...
@@ -43,8 +43,7 @@ class SimplesitemapTest extends WebTestBase {
* Test Simple sitemap integration.
*/
public
function
testSimplesitemap
()
{
$sitemap
=
\
Drupal
::
service
(
'simple_sitemap.generator'
);
$sitemap
->
generateSitemap
(
'backend'
);
\
Drupal
::
service
(
'simple_sitemap.generator'
)
->
generateSitemap
(
'backend'
);
// Verify sitemap.xml can be cached.
$this
->
drupalGet
(
'sitemap.xml'
);
...
...
@@ -53,10 +52,10 @@ class SimplesitemapTest extends WebTestBase {
$this
->
assertEqual
(
$this
->
drupalGetHeader
(
'X-Drupal-Cache'
),
'HIT'
);
/* @var $node \Drupal\Node\NodeInterface */
$node
=
$this
->
createNode
([
'title'
=>
'A new page'
]);
$node
=
$this
->
createNode
([
'title'
=>
'A new
page'
,
'type'
=>
'
page'
]);
// Generate new sitemap.
$sitemap
->
generateSitemap
();
\
Drupal
::
service
(
'simple_sitemap.generator'
)
->
generateSitemap
(
'backend'
);
// Verify the cache was flushed and node is in the sitemap.
$this
->
drupalGet
(
'sitemap.xml'
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment