Skip to content

Commit

Permalink
Isolate allowed elements for sorting tests to prevent other modules b…
Browse files Browse the repository at this point in the history
…reaking them
  • Loading branch information
robbieaverill committed Jan 24, 2019
1 parent a414f76 commit 7271c96
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Extensions/ElementalAreasExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace DNADesign\Elemental\Tests\Extensions;

use DNADesign\Elemental\Extensions\ElementalAreasExtension;
use DNADesign\Elemental\Models\ElementContent;
use DNADesign\Elemental\Tests\Src\TestElement;
use DNADesign\Elemental\Tests\Src\TestUnusedElement;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;

class ElementalAreasExtensionTest extends SapphireTest
Expand All @@ -29,7 +29,11 @@ protected function setUp()
$this->logInWithPermission('ADMIN');

SiteTree::config()
->set('allowed_elements', null)
->set('allowed_elements', [
ElementContent::class,
TestElement::class,
TestUnusedElement::class,
])
->set('disallowed_elements', []);
}

Expand Down

0 comments on commit 7271c96

Please sign in to comment.