From 5acf2aab94dcf39a4399a1fc8e3b68b13d00ed85 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 30 May 2013 21:05:39 +1200 Subject: [PATCH] Use the new form ID selectors for FormTest --- tests/forms/FormTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/forms/FormTest.php b/tests/forms/FormTest.php index db98158e3..d2181dc79 100644 --- a/tests/forms/FormTest.php +++ b/tests/forms/FormTest.php @@ -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' ),