mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
5de26cd897
Replaced the complex table field used for editing the email recipients with GridField Replaced instances of SAPPHIRE_DIR with FRAMEWORK_DIR Replaced instances of sapphire/ in css and templates with framework/ Re-organized tabs on user defined form so they are top level Replaced calls to toDropdownMap() with map() Renamed getCMSFields_forPopup() top getCMSFields()
46 lines
913 B
PHP
46 lines
913 B
PHP
<?php
|
|
|
|
/**
|
|
* Tests covering the form editor / builder and
|
|
* some of the user interface
|
|
*
|
|
* @package userforms
|
|
*/
|
|
|
|
class FieldEditorTest extends FunctionalTest {
|
|
|
|
static $fixture_file = 'userforms/tests/UserDefinedFormTest.yml';
|
|
|
|
protected $editor;
|
|
|
|
function setUp() {
|
|
parent::setUp();
|
|
|
|
$form = $this->objFromFixture('UserDefinedForm', 'basic-form-page');
|
|
|
|
$controller = new FieldEditorTest_Controller($form);
|
|
|
|
$fields = $controller->Form()->Fields();
|
|
|
|
$this->editor = $fields->fieldByName('Fields');
|
|
}
|
|
|
|
function testSaveInto() {
|
|
$this->logInWithPermission('ADMIN');
|
|
|
|
// @todo
|
|
}
|
|
|
|
function testAddField() {
|
|
$this->logInWithPermission('ADMIN');
|
|
|
|
// Debug::show($this->editor->addfield());
|
|
}
|
|
}
|
|
|
|
class FieldEditorTest_Controller extends Controller {
|
|
|
|
function Form() {
|
|
return new Form($this, 'Form', new FieldList(new FieldEditor('Fields')), new FieldList());
|
|
}
|
|
} |