mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX Change BaseClass to ParentClass
This commit is contained in:
parent
d1b947afbe
commit
d1697606e1
@ -24,7 +24,7 @@ class CommentingControllerTest extends FunctionalTest
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public static $fixture_file = 'CommentsTest.yml';
|
||||
protected static $fixture_file = 'CommentsTest.yml';
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@ -18,7 +18,7 @@ class CommentsExtensionTest extends SapphireTest
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||
protected static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@ -118,6 +118,7 @@ class CommentsGridFieldActionTest extends SapphireTest
|
||||
|
||||
public function testHandleAction()
|
||||
{
|
||||
$this->logInWithPermission('CMS_ACCESS_CommentAdmin');
|
||||
$action = new CommentsGridFieldAction();
|
||||
$record = new Comment();
|
||||
$record->Name = 'Name of commenter';
|
||||
|
@ -24,10 +24,8 @@ use SilverStripe\Security\Permission;
|
||||
*/
|
||||
class CommentsTest extends FunctionalTest
|
||||
{
|
||||
|
||||
public static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||
protected static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||
|
||||
|
||||
protected $extraDataObjects = array(
|
||||
CommentableItem::class,
|
||||
CommentableItemEnabled::class,
|
||||
@ -461,7 +459,7 @@ class CommentsTest extends FunctionalTest
|
||||
// Without HTML allowed
|
||||
$comment1 = new Comment();
|
||||
$comment1->AllowHtml = false;
|
||||
$comment1->BaseClass = CommentableItem::class;
|
||||
$comment1->ParentClass = CommentableItem::class;
|
||||
$comment1->Comment = '<p><script>alert("w00t")</script>my comment</p>';
|
||||
$comment1->write();
|
||||
$this->assertEquals(
|
||||
@ -502,7 +500,7 @@ class CommentsTest extends FunctionalTest
|
||||
$comment->Comment = '<p>my comment</p>';
|
||||
$comment->AllowHtml = false;
|
||||
$comment->ParentID = $item->ID;
|
||||
$comment->BaseClass = CommentableItem::class;
|
||||
$comment->ParentClass = CommentableItem::class;
|
||||
$comment->write();
|
||||
|
||||
$html = $item->customise(array('CommentsEnabled' => true))->renderWith('CommentsInterface');
|
||||
|
Loading…
Reference in New Issue
Block a user