Merge pull request #235 from creative-commoners/pulls/3.0/run-test-independent-from-template

Use FunctionalTest instead of SapphireTest to disable themes.
This commit is contained in:
Robbie Averill 2018-03-09 17:02:47 +13:00 committed by GitHub
commit 532b49c537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,14 +9,17 @@ use SilverStripe\Comments\Tests\Stubs\CommentableItem;
use SilverStripe\Comments\Tests\Stubs\CommentableItemDisabled; use SilverStripe\Comments\Tests\Stubs\CommentableItemDisabled;
use SilverStripe\Comments\Tests\Stubs\CommentableItemEnabled; use SilverStripe\Comments\Tests\Stubs\CommentableItemEnabled;
use SilverStripe\Core\Config\Config; use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\FunctionalTest;
use SilverStripe\Dev\SapphireTest; use SilverStripe\Dev\SapphireTest;
use SilverStripe\Security\Member; use SilverStripe\Security\Member;
use SilverStripe\View\Requirements; use SilverStripe\View\Requirements;
class CommentsExtensionTest extends SapphireTest class CommentsExtensionTest extends FunctionalTest
{ {
protected static $fixture_file = 'CommentsTest.yml'; protected static $fixture_file = 'CommentsTest.yml';
protected static $disable_themes = true;
protected static $extra_dataobjects = [ protected static $extra_dataobjects = [
CommentableItem::class, CommentableItem::class,
CommentableItemEnabled::class, CommentableItemEnabled::class,
@ -249,6 +252,8 @@ class CommentsExtensionTest extends SapphireTest
public function testCommentsForm() public function testCommentsForm()
{ {
$this->logInWithPermission('ADMIN');
Config::modify()->merge(CommentableItem::class, 'comments', array( Config::modify()->merge(CommentableItem::class, 'comments', array(
'include_js' => false, 'include_js' => false,
'comments_holder_id' => 'comments-holder', 'comments_holder_id' => 'comments-holder',