3 * Ethna_ActionError_Test.php
5 * @author Yoshinari Takaoka <takaoka@beatcraft.com>
9 //{{{ Ethna_ActionError_Test
11 * Test Case For Ethna_ActionError
15 class Ethna_ActionError_Test extends Ethna_UnitTestBase
20 var $error_form_name1;
26 $this->ae = new Ethna_ActionError();
27 $this->error_form_name = "hoge";
28 $this->message = "test error";
29 $this->error_form_name1 = "tititi";
30 $this->message1 = "test error1";
32 $this->error_obj = new Ethna_Error(
38 // add dummy error object.
39 $this->ae->add($this->error_form_name,
43 $this->ae->addObject($this->error_form_name1,
50 $this->assertEqual($this->ae->count(), 2);
53 function test_length()
55 $this->assertEqual($this->ae->length(), 2);
58 function test_iserror()
61 $this->ae->isError($this->error_form_name)
64 $this->ae->isError($this->error_form_name1)
68 function test_geterrorlist()
71 is_array($this->ae->getErrorList())
75 function test_getmessage()
77 $error_msg = $this->ae->getMessage(
78 $this->error_form_name
80 $error_msg1 = $this->ae->getMessage(
81 $this->error_form_name1
84 $this->assertEqual($this->message, $error_msg);
85 $this->assertEqual($this->message1, $error_msg1);
92 $this->ae->count() == 0