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
|
// The comments form is HTML to do assertions by contains
|
||||||
$cf = $item->CommentsForm();
|
$cf = $item->CommentsForm();
|
||||||
$expected = '<form id="comments-holder" action="/comments'
|
$expected = '/comments/CommentsForm/" method="post" enctype="application/x-www-form-urlencoded">';
|
||||||
. '/CommentsForm/" method="post" enctype="application/x-www-form-urlenco'
|
|
||||||
. 'ded">';
|
|
||||||
|
|
||||||
$this->assertContains($expected, $cf);
|
$this->assertContains($expected, $cf);
|
||||||
$this->assertContains('<h4>Post your comment</h4>', $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"';
|
$expected = '<input type="submit" name="action_doPostComment" value="Post" class="action" id="comments-holder_action_doPostComment"';
|
||||||
$this->assertContains($expected, $cf);
|
$this->assertContains($expected, $cf);
|
||||||
|
|
||||||
$expected = '<a href="/comments/spam/';
|
$expected = '/comments/spam/';
|
||||||
$this->assertContains($expected, $cf);
|
$this->assertContains($expected, $cf);
|
||||||
|
|
||||||
$expected = '<p>Reply to firstComA 1</p>';
|
$expected = '<p>Reply to firstComA 1</p>';
|
||||||
$this->assertContains($expected, $cf);
|
$this->assertContains($expected, $cf);
|
||||||
|
|
||||||
$expected = '<a href="/comments/delete';
|
$expected = '/comments/delete';
|
||||||
$this->assertContains($expected, $cf);
|
$this->assertContains($expected, $cf);
|
||||||
|
|
||||||
$expected = '<p>Reply to firstComA 2</p>';
|
$expected = '<p>Reply to firstComA 2</p>';
|
||||||
|
@ -819,30 +819,30 @@ class CommentsTest extends FunctionalTest
|
|||||||
$method = $this->getMethod('ActionLink');
|
$method = $this->getMethod('ActionLink');
|
||||||
|
|
||||||
// test with starts of strings and tokens and salts change each time
|
// test with starts of strings and tokens and salts change each time
|
||||||
$this->assertStringStartsWith(
|
$this->assertContains(
|
||||||
'/comments/theaction/' . $comment->ID,
|
'/comments/theaction/' . $comment->ID,
|
||||||
$method->invokeArgs($comment, array('theaction'))
|
$method->invokeArgs($comment, array('theaction'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertStringStartsWith(
|
$this->assertContains(
|
||||||
'/comments/delete/' . $comment->ID,
|
'/comments/delete/' . $comment->ID,
|
||||||
$comment->DeleteLink()
|
$comment->DeleteLink()
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertStringStartsWith(
|
$this->assertContains(
|
||||||
'/comments/spam/' . $comment->ID,
|
'/comments/spam/' . $comment->ID,
|
||||||
$comment->SpamLink()
|
$comment->SpamLink()
|
||||||
);
|
);
|
||||||
|
|
||||||
$comment->markSpam();
|
$comment->markSpam();
|
||||||
$this->assertStringStartsWith(
|
$this->assertContains(
|
||||||
'/comments/ham/' . $comment->ID,
|
'/comments/ham/' . $comment->ID,
|
||||||
$comment->HamLink()
|
$comment->HamLink()
|
||||||
);
|
);
|
||||||
|
|
||||||
//markApproved
|
//markApproved
|
||||||
$comment->markUnapproved();
|
$comment->markUnapproved();
|
||||||
$this->assertStringStartsWith(
|
$this->assertContains(
|
||||||
'/comments/approve/' . $comment->ID,
|
'/comments/approve/' . $comment->ID,
|
||||||
$comment->ApproveLink()
|
$comment->ApproveLink()
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user