Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
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
drupal-3174996
Commits
3e854432
Commit
3e854432
authored
12 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1786124
by xjm: Clean up node access pager test.
parent
f5955bfe
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
core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
+10
-10
10 additions, 10 deletions
...odules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
with
10 additions
and
10 deletions
core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
+
10
−
10
View file @
3e854432
...
...
@@ -62,24 +62,24 @@ public function testCommentPager() {
// View the node page. With the default 50 comments per page there should
// be two pages (0, 1) but no third (2) page.
$this
->
drupalGet
(
'node/'
.
$node
->
nid
);
$this
->
assertText
(
$node
->
label
()
,
t
(
'Node title found.'
)
);
$this
->
assertText
(
t
(
'Comments'
)
,
t
(
'Has a comments section.'
)
);
$this
->
assertRaw
(
'page=1'
,
t
(
'Secound page exists.'
)
);
$this
->
assertNoRaw
(
'page=2'
,
t
(
'No third page exists.'
)
);
$this
->
assertText
(
$node
->
label
());
$this
->
assertText
(
t
(
'Comments'
));
$this
->
assertRaw
(
'page=1'
);
$this
->
assertNoRaw
(
'page=2'
);
}
/**
* Tests the forum node pager for nodes with multiple grants per realm.
*/
public
function
testForumPager
()
{
// Lookup the forums vocabulary
vid
.
// Look
up the forums vocabulary
ID
.
$vid
=
config
(
'forum.settings'
)
->
get
(
'vocabulary'
);
$this
->
assertTrue
(
$vid
,
t
(
'Forum navigation vocabulary
found
.'
)
)
;
$this
->
assertTrue
(
$vid
,
'Forum navigation vocabulary
ID is set
.'
);
// Lookup the general discussion term.
// Look
up the general discussion term.
$tree
=
taxonomy_get_tree
(
$vid
,
0
,
1
);
$tid
=
reset
(
$tree
)
->
tid
;
$this
->
assertTrue
(
$tid
,
t
(
'General discussion term found.'
)
)
;
$this
->
assertTrue
(
$tid
,
'General discussion term
is
found
in the forum vocabulary
.'
);
// Create 30 nodes.
for
(
$i
=
0
;
$i
<
30
;
$i
++
)
{
...
...
@@ -98,7 +98,7 @@ public function testForumPager() {
// page there should be two pages for 30 nodes, no more.
$this
->
drupalLogin
(
$this
->
web_user
);
$this
->
drupalGet
(
'forum/'
.
$tid
);
$this
->
assertRaw
(
'page=1'
,
t
(
'Secound page exists.'
)
);
$this
->
assertNoRaw
(
'page=2'
,
t
(
'No third page exists.'
)
);
$this
->
assertRaw
(
'page=1'
);
$this
->
assertNoRaw
(
'page=2'
);
}
}
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