From 8d5edc78217fc3ae4beb806bffc9e0c36beb8a83 Mon Sep 17 00:00:00 2001 From: Raissa North Date: Fri, 9 Mar 2018 16:45:38 +1300 Subject: [PATCH] Use FunctionalTest instead of SapphireTest to disable themes. --- tests/CommentsExtensionTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CommentsExtensionTest.php b/tests/CommentsExtensionTest.php index 27ba283..40cad86 100644 --- a/tests/CommentsExtensionTest.php +++ b/tests/CommentsExtensionTest.php @@ -9,14 +9,17 @@ use SilverStripe\Comments\Tests\Stubs\CommentableItem; use SilverStripe\Comments\Tests\Stubs\CommentableItemDisabled; use SilverStripe\Comments\Tests\Stubs\CommentableItemEnabled; use SilverStripe\Core\Config\Config; +use SilverStripe\Dev\FunctionalTest; use SilverStripe\Dev\SapphireTest; use SilverStripe\Security\Member; use SilverStripe\View\Requirements; -class CommentsExtensionTest extends SapphireTest +class CommentsExtensionTest extends FunctionalTest { protected static $fixture_file = 'CommentsTest.yml'; + protected static $disable_themes = true; + protected static $extra_dataobjects = [ CommentableItem::class, CommentableItemEnabled::class, @@ -249,6 +252,8 @@ class CommentsExtensionTest extends SapphireTest public function testCommentsForm() { + $this->logInWithPermission('ADMIN'); + Config::modify()->merge(CommentableItem::class, 'comments', array( 'include_js' => false, 'comments_holder_id' => 'comments-holder',