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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public static $fixture_file = 'CommentsTest.yml';
|
protected static $fixture_file = 'CommentsTest.yml';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
@ -18,7 +18,7 @@ class CommentsExtensionTest extends SapphireTest
|
|||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public static $fixture_file = 'comments/tests/CommentsTest.yml';
|
protected static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
@ -118,6 +118,7 @@ class CommentsGridFieldActionTest extends SapphireTest
|
|||||||
|
|
||||||
public function testHandleAction()
|
public function testHandleAction()
|
||||||
{
|
{
|
||||||
|
$this->logInWithPermission('CMS_ACCESS_CommentAdmin');
|
||||||
$action = new CommentsGridFieldAction();
|
$action = new CommentsGridFieldAction();
|
||||||
$record = new Comment();
|
$record = new Comment();
|
||||||
$record->Name = 'Name of commenter';
|
$record->Name = 'Name of commenter';
|
||||||
|
@ -24,9 +24,7 @@ use SilverStripe\Security\Permission;
|
|||||||
*/
|
*/
|
||||||
class CommentsTest extends FunctionalTest
|
class CommentsTest extends FunctionalTest
|
||||||
{
|
{
|
||||||
|
protected static $fixture_file = 'comments/tests/CommentsTest.yml';
|
||||||
public static $fixture_file = 'comments/tests/CommentsTest.yml';
|
|
||||||
|
|
||||||
|
|
||||||
protected $extraDataObjects = array(
|
protected $extraDataObjects = array(
|
||||||
CommentableItem::class,
|
CommentableItem::class,
|
||||||
@ -461,7 +459,7 @@ class CommentsTest extends FunctionalTest
|
|||||||
// Without HTML allowed
|
// Without HTML allowed
|
||||||
$comment1 = new Comment();
|
$comment1 = new Comment();
|
||||||
$comment1->AllowHtml = false;
|
$comment1->AllowHtml = false;
|
||||||
$comment1->BaseClass = CommentableItem::class;
|
$comment1->ParentClass = CommentableItem::class;
|
||||||
$comment1->Comment = '<p><script>alert("w00t")</script>my comment</p>';
|
$comment1->Comment = '<p><script>alert("w00t")</script>my comment</p>';
|
||||||
$comment1->write();
|
$comment1->write();
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
@ -502,7 +500,7 @@ class CommentsTest extends FunctionalTest
|
|||||||
$comment->Comment = '<p>my comment</p>';
|
$comment->Comment = '<p>my comment</p>';
|
||||||
$comment->AllowHtml = false;
|
$comment->AllowHtml = false;
|
||||||
$comment->ParentID = $item->ID;
|
$comment->ParentID = $item->ID;
|
||||||
$comment->BaseClass = CommentableItem::class;
|
$comment->ParentClass = CommentableItem::class;
|
||||||
$comment->write();
|
$comment->write();
|
||||||
|
|
||||||
$html = $item->customise(array('CommentsEnabled' => true))->renderWith('CommentsInterface');
|
$html = $item->customise(array('CommentsEnabled' => true))->renderWith('CommentsInterface');
|
||||||
|
Loading…
Reference in New Issue
Block a user