From 4335d8d910009e0f00771c77f95ea9e616841310 Mon Sep 17 00:00:00 2001 From: Kirk Mayo Date: Fri, 22 Jun 2012 12:21:08 +1200 Subject: [PATCH] #BUGFIX: ticket 7314 fixing the PHPUnit tests for SS 3.0 --- tests/UserDefinedFormControllerTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/UserDefinedFormControllerTest.php b/tests/UserDefinedFormControllerTest.php index 61a6361..b0b0f92 100644 --- a/tests/UserDefinedFormControllerTest.php +++ b/tests/UserDefinedFormControllerTest.php @@ -70,7 +70,7 @@ class UserDefinedFormControllerTest extends FunctionalTest { $controller = new UserDefinedFormControllerTest_Controller($form); // test form - $this->assertEquals($controller->Form()->Name(), 'Form', 'The form is referenced as Form'); + $this->assertEquals($controller->Form()->getName(), 'Form', 'The form is referenced as Form'); $this->assertEquals($controller->Form()->Fields()->Count(), 1); // disabled SecurityID token fields $this->assertEquals($controller->Form()->Actions()->Count(), 1); $this->assertEquals(count($controller->Form()->getValidator()->getRequired()), 0); @@ -148,7 +148,8 @@ class UserDefinedFormControllerTest extends FunctionalTest { function testArrayToJson() { $array = array('1' => 'one', '2' => 'two'); $string = "{\n1:\"one\", 2:\"two\"\n}\n"; - $this->assertEquals(UserDefinedFormControllerTest_Controller::array2json($array), $string); + $form = new UserDefinedFormControllerTest_Controller(); + $this->assertEquals($form->array2json($array), $string); } @@ -224,4 +225,4 @@ class UserDefinedFormControllerTest_Controller extends UserDefinedForM_Controlle return $form; } -} \ No newline at end of file +}