From 007ed25c0b9e01e10dd4bf950975a648a5ec6654 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 20 Apr 2012 15:02:43 +1200 Subject: [PATCH] MINOR Fixing broken tests --- tests/forms/FormTest.php | 10 ++++------ tests/security/SecurityTest.php | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/forms/FormTest.php b/tests/forms/FormTest.php index 52dd0fbfd..ab90ff7b8 100644 --- a/tests/forms/FormTest.php +++ b/tests/forms/FormTest.php @@ -194,9 +194,8 @@ class FormTest extends FunctionalTest { function testSessionValidationMessage() { $this->get('FormTest_Controller'); - $response = $this->submitForm( - 'Form_Form', - null, + $response = $this->post( + 'FormTest_Controller/Form', array( 'Email' => 'invalid', // leaving out "Required" field @@ -222,9 +221,8 @@ class FormTest extends FunctionalTest { function testSessionSuccessMessage() { $this->get('FormTest_Controller'); - $response = $this->submitForm( - 'Form_Form', - null, + $response = $this->post( + 'FormTest_Controller/Form', array( 'Email' => 'test@test.com', 'SomeRequiredField' => 'test', diff --git a/tests/security/SecurityTest.php b/tests/security/SecurityTest.php index 2e717fdfd..0d2770055 100644 --- a/tests/security/SecurityTest.php +++ b/tests/security/SecurityTest.php @@ -210,7 +210,7 @@ class SecurityTest extends FunctionalTest { // Request new password by email $response = $this->get('Security/lostpassword'); - $response = $this->submitForm('MemberLoginForm_LostPasswordForm', null, array('Email' => 'sam@silverstripe.com')); + $response = $this->post('Security/LostPasswordForm', array('Email' => 'sam@silverstripe.com')); $this->assertEmailSent('sam@silverstripe.com');