mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Use the new form ID selectors for FormTest
This commit is contained in:
parent
41974b9632
commit
5acf2aab94
@ -13,7 +13,7 @@ class FormTest extends FunctionalTest {
|
||||
'FormTest_Team',
|
||||
);
|
||||
|
||||
function setUp() {
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
Config::inst()->update('Director', 'rules', array(
|
||||
@ -229,8 +229,6 @@ class FormTest extends FunctionalTest {
|
||||
}
|
||||
|
||||
public function testSessionValidationMessage() {
|
||||
Config::inst()->update('Injector', 'FormTemplateHelper', array('class' => 'FormTemplateHelper_Pre32'));
|
||||
|
||||
$this->get('FormTest_Controller');
|
||||
|
||||
$response = $this->post(
|
||||
@ -240,15 +238,16 @@ class FormTest extends FunctionalTest {
|
||||
// leaving out "Required" field
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertPartialMatchBySelector(
|
||||
'#Email span.message',
|
||||
'#Form_Form_Email_Holder span.message',
|
||||
array(
|
||||
'Please enter an email address'
|
||||
),
|
||||
'Formfield validation shows note on field if invalid'
|
||||
);
|
||||
$this->assertPartialMatchBySelector(
|
||||
'#SomeRequiredField span.required',
|
||||
'#Form_Form_SomeRequiredField_Holder span.required',
|
||||
array(
|
||||
'"Some Required Field" is required'
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user