mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
BUG: Fixed #4 where exceptions are being thrown due to parsing errors in testSessionController
This commit is contained in:
parent
20efb0c6fa
commit
3ac49cd461
@ -67,10 +67,10 @@ class TestSessionController extends Controller {
|
|||||||
);
|
);
|
||||||
if($databaseTemplates) {
|
if($databaseTemplates) {
|
||||||
$fields->push(
|
$fields->push(
|
||||||
(new DropdownField('createDatabaseTemplate', false))
|
$createDatabaseTemplate = new DropdownField('createDatabaseTemplate', false)
|
||||||
->setSource($databaseTemplates)
|
|
||||||
->setEmptyString('Empty database')
|
|
||||||
);
|
);
|
||||||
|
$createDatabaseTemplate->setSource($databaseTemplates);
|
||||||
|
$createDatabaseTemplate->setEmptyString('Empty database');
|
||||||
}
|
}
|
||||||
$fields->merge($this->getBaseFields());
|
$fields->merge($this->getBaseFields());
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
@ -111,11 +111,11 @@ class TestSessionController extends Controller {
|
|||||||
|
|
||||||
protected function getBaseFields() {
|
protected function getBaseFields() {
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
(new TextField('fixture', 'Fixture YAML file path'))
|
$textField = new TextField('fixture', 'Fixture YAML file path'),
|
||||||
->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml'),
|
|
||||||
$datetimeField = new DatetimeField('datetime', 'Custom date'),
|
$datetimeField = new DatetimeField('datetime', 'Custom date'),
|
||||||
new HiddenField('flush', null, 1)
|
new HiddenField('flush', null, 1)
|
||||||
);
|
);
|
||||||
|
$textField->setAttribute('placeholder', 'Example: framework/tests/security/MemberTest.yml');
|
||||||
$datetimeField->getDateField()
|
$datetimeField->getDateField()
|
||||||
->setConfig('dateformat', 'yyyy-MM-dd')
|
->setConfig('dateformat', 'yyyy-MM-dd')
|
||||||
->setConfig('showcalendar', true)
|
->setConfig('showcalendar', true)
|
||||||
|
Loading…
Reference in New Issue
Block a user