mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix tests not loading fixtures and loading themes in CWP recipe kitchen sink
This commit is contained in:
parent
c58a75eed1
commit
d00c59c383
@ -7,11 +7,17 @@ use SilverStripe\Dev\SapphireTest;
|
|||||||
use SilverStripe\Forms\Form;
|
use SilverStripe\Forms\Form;
|
||||||
use SilverStripe\Forms\FormTemplateHelper;
|
use SilverStripe\Forms\FormTemplateHelper;
|
||||||
use SilverStripe\Forms\TreeMultiselectField;
|
use SilverStripe\Forms\TreeMultiselectField;
|
||||||
|
use SilverStripe\ORM\Tests\HierarchyTest\TestObject;
|
||||||
|
use SilverStripe\View\SSViewer;
|
||||||
|
|
||||||
class TreeMultiselectFieldTest extends SapphireTest
|
class TreeMultiselectFieldTest extends SapphireTest
|
||||||
{
|
{
|
||||||
protected static $fixture_file = 'TreeDropdownFieldTest.yml';
|
protected static $fixture_file = 'TreeDropdownFieldTest.yml';
|
||||||
|
|
||||||
|
protected static $extra_dataobjects = [
|
||||||
|
TestObject::class,
|
||||||
|
];
|
||||||
|
|
||||||
protected $formId = 'TheFormID';
|
protected $formId = 'TheFormID';
|
||||||
protected $fieldName = 'TestTree';
|
protected $fieldName = 'TestTree';
|
||||||
|
|
||||||
@ -54,6 +60,9 @@ class TreeMultiselectFieldTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
// Don't let other themes interfere with these tests
|
||||||
|
SSViewer::set_themes([]);
|
||||||
|
|
||||||
$this->form = $this->buildFormMock();
|
$this->form = $this->buildFormMock();
|
||||||
$this->field = $this->buildField($this->form);
|
$this->field = $this->buildField($this->form);
|
||||||
$this->folders = $this->loadFolders();
|
$this->folders = $this->loadFolders();
|
||||||
|
Loading…
Reference in New Issue
Block a user