Merge pull request #8755 from creative-commoners/pulls/4.3/fix-tests

Fix tests not loading fixtures and loading themes in CWP recipe kitchen sink
This commit is contained in:
Robbie Averill 2019-01-24 17:02:30 +02:00 committed by GitHub
commit defe9b1c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,11 +7,17 @@ use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormTemplateHelper;
use SilverStripe\Forms\TreeMultiselectField;
use SilverStripe\ORM\Tests\HierarchyTest\TestObject;
use SilverStripe\View\SSViewer;
class TreeMultiselectFieldTest extends SapphireTest
{
protected static $fixture_file = 'TreeDropdownFieldTest.yml';
protected static $extra_dataobjects = [
TestObject::class,
];
protected $formId = 'TheFormID';
protected $fieldName = 'TestTree';
@ -54,6 +60,9 @@ class TreeMultiselectFieldTest extends SapphireTest
{
parent::setUp();
// Don't let other themes interfere with these tests
SSViewer::set_themes([]);
$this->form = $this->buildFormMock();
$this->field = $this->buildField($this->form);
$this->folders = $this->loadFolders();