Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
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-3443915
Commits
804b313a
Commit
804b313a
authored
16 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#296486
by lyricnz and boombatower: Tests for viewing an individual comment.
parent
c32c0f51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/comment/comment.test
+12
-2
12 additions, 2 deletions
modules/comment/comment.test
with
12 additions
and
2 deletions
modules/comment/comment.test
+
12
−
2
View file @
804b313a
...
...
@@ -54,7 +54,8 @@ class CommentHelperCase extends DrupalWebTestCase {
// Get comment.
if
(
$contact
!==
TRUE
)
{
// If true then attempting to find error message.
$this
->
assertText
(
$subject
,
'Comment posted.'
);
$this
->
assertText
(
$subject
,
'Comment subject posted.'
);
$this
->
assertText
(
$comment
,
'Comment body posted.'
);
$this
->
assertTrue
((
!
empty
(
$match
)
&&
!
empty
(
$match
[
1
])),
t
(
'Comment id found.'
));
}
...
...
@@ -266,11 +267,20 @@ class CommentInterfaceTest extends CommentHelperCase {
// Create comment that requires preview.
$this
->
drupalLogin
(
$this
->
web_user
);
$comment
=
$this
->
postComment
(
$this
->
node
,
$this
->
randomName
(),
$this
->
randomName
());
$subject_text
=
$this
->
randomName
();
$comment_text
=
$this
->
randomName
();
$comment
=
$this
->
postComment
(
$this
->
node
,
$subject_text
,
$comment_text
);
$this
->
assertTrue
(
$this
->
commentExists
(
$comment
),
t
(
'Comment found.'
));
// Check comment display.
$this
->
drupalGet
(
'node/'
.
$this
->
node
->
nid
.
'/'
.
$comment
->
id
);
$this
->
assertText
(
$subject_text
,
t
(
'Individual comment subject found.'
));
$this
->
assertText
(
$comment_text
,
t
(
'Individual comment body found.'
));
// 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
());
$this
->
assertTrue
(
$this
->
commentExists
(
$reply
,
TRUE
),
t
(
'Reply found.'
));
...
...
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