silverstripe-userforms/tests/FieldEditorTest.php
edchipman@gmail.com 5de26cd897 Replaced all instances of new FieldSet() with new FieldList()
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()
2012-05-07 17:41:29 +12:00

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());
}
}