Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Commits
126a5e3c
Commit
126a5e3c
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#320784
by johnskulski: added test for comment threading. This test currently fails.
parent
c9cbd0d5
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/comment/comment.test
+14
-1
14 additions, 1 deletion
modules/comment/comment.test
with
14 additions
and
1 deletion
modules/comment/comment.test
+
14
−
1
View file @
126a5e3c
...
...
@@ -269,6 +269,7 @@ class CommentInterfaceTest extends CommentHelperCase {
$subject_text
=
$this
->
randomName
();
$comment_text
=
$this
->
randomName
();
$comment
=
$this
->
postComment
(
$this
->
node
,
$subject_text
,
$comment_text
);
$comment_loaded
=
comment_load
(
$comment
->
id
);
$this
->
assertTrue
(
$this
->
commentExists
(
$comment
),
t
(
'Comment found.'
));
// Check comment display.
...
...
@@ -281,7 +282,19 @@ class CommentInterfaceTest extends CommentHelperCase {
$this
->
assertText
(
$subject_text
,
t
(
'Individual comment-reply subject found.'
));
$this
->
assertText
(
$comment_text
,
t
(
'Individual comment-reply body found.'
));
$reply
=
$this
->
postComment
(
NULL
,
$this
->
randomName
(),
$this
->
randomName
());
$reply_loaded
=
comment_load
(
$reply
->
id
);
$this
->
assertTrue
(
$this
->
commentExists
(
$reply
,
TRUE
),
t
(
'Reply found.'
));
$this
->
assertEqual
(
$comment
->
id
,
$reply_loaded
->
pid
,
t
(
'Pid of a reply to a comment is set correctly.'
));
$this
->
assertEqual
(
rtrim
(
$comment_loaded
->
thread
,
'/'
)
.
'.00/'
,
$reply_loaded
->
thread
,
t
(
'Thread of reply grows correctly.'
));
// Second reply to comment
$this
->
drupalGet
(
'comment/reply/'
.
$this
->
node
->
nid
.
'/'
.
$comment
->
id
);
$this
->
assertText
(
$subject_text
,
t
(
'Individual comment-reply subject found.'
));
$this
->
assertText
(
$comment_text
,
t
(
'Individual comment-reply body found.'
));
$reply
=
$this
->
postComment
(
NULL
,
$this
->
randomName
(),
$this
->
randomName
());
$reply_loaded
=
comment_load
(
$reply
->
id
);
$this
->
assertTrue
(
$this
->
commentExists
(
$reply
,
TRUE
),
t
(
'Second reply found.'
));
$this
->
assertEqual
(
rtrim
(
$comment_loaded
->
thread
,
'/'
)
.
'.01/'
,
$reply_loaded
->
thread
,
t
(
'Thread of second reply grows correctly.'
));
// Edit reply.
$this
->
drupalGet
(
'comment/edit/'
.
$reply
->
id
);
...
...
@@ -290,7 +303,7 @@ class CommentInterfaceTest extends CommentHelperCase {
// Correct link count
$this
->
drupalGet
(
'node'
);
$this
->
assertRaw
(
'
2
comments'
,
t
(
'Link to the
2
comments exist.'
));
$this
->
assertRaw
(
'
3
comments'
,
t
(
'Link to the
3
comments exist.'
));
// Pager
$this
->
setCommentsPerPage
(
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