mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX Remove base path assertions from tests which behave differently using phpdbg
This commit is contained in:
parent
fa61608c7d
commit
7700d88d4a
@ -258,9 +258,7 @@ class CommentsExtensionTest extends SapphireTest
|
||||
|
||||
// The comments form is HTML to do assertions by contains
|
||||
$cf = $item->CommentsForm();
|
||||
$expected = '<form id="comments-holder" action="/comments'
|
||||
. '/CommentsForm/" method="post" enctype="application/x-www-form-urlenco'
|
||||
. 'ded">';
|
||||
$expected = '/comments/CommentsForm/" method="post" enctype="application/x-www-form-urlencoded">';
|
||||
|
||||
$this->assertContains($expected, $cf);
|
||||
$this->assertContains('<h4>Post your comment</h4>', $cf);
|
||||
@ -283,13 +281,13 @@ class CommentsExtensionTest extends SapphireTest
|
||||
$expected = '<input type="submit" name="action_doPostComment" value="Post" class="action" id="comments-holder_action_doPostComment"';
|
||||
$this->assertContains($expected, $cf);
|
||||
|
||||
$expected = '<a href="/comments/spam/';
|
||||
$expected = '/comments/spam/';
|
||||
$this->assertContains($expected, $cf);
|
||||
|
||||
$expected = '<p>Reply to firstComA 1</p>';
|
||||
$this->assertContains($expected, $cf);
|
||||
|
||||
$expected = '<a href="/comments/delete';
|
||||
$expected = '/comments/delete';
|
||||
$this->assertContains($expected, $cf);
|
||||
|
||||
$expected = '<p>Reply to firstComA 2</p>';
|
||||
|
@ -819,30 +819,30 @@ class CommentsTest extends FunctionalTest
|
||||
$method = $this->getMethod('ActionLink');
|
||||
|
||||
// test with starts of strings and tokens and salts change each time
|
||||
$this->assertStringStartsWith(
|
||||
$this->assertContains(
|
||||
'/comments/theaction/' . $comment->ID,
|
||||
$method->invokeArgs($comment, array('theaction'))
|
||||
);
|
||||
|
||||
$this->assertStringStartsWith(
|
||||
$this->assertContains(
|
||||
'/comments/delete/' . $comment->ID,
|
||||
$comment->DeleteLink()
|
||||
);
|
||||
|
||||
$this->assertStringStartsWith(
|
||||
$this->assertContains(
|
||||
'/comments/spam/' . $comment->ID,
|
||||
$comment->SpamLink()
|
||||
);
|
||||
|
||||
$comment->markSpam();
|
||||
$this->assertStringStartsWith(
|
||||
$this->assertContains(
|
||||
'/comments/ham/' . $comment->ID,
|
||||
$comment->HamLink()
|
||||
);
|
||||
|
||||
//markApproved
|
||||
$comment->markUnapproved();
|
||||
$this->assertStringStartsWith(
|
||||
$this->assertContains(
|
||||
'/comments/approve/' . $comment->ID,
|
||||
$comment->ApproveLink()
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user