6 * @package {$project_id}
11 * {$action_name} Form testcase.
15 * @package {$project_id}
17 class {$action_form}_TestCase extends Ethna_UnitTestCase
21 * @var string Action name.
23 var $action_name = '{$action_name}';
32 $this->createActionForm(); // create ActionForm.
45 * {$action_name} ActionForm sample testcase.
49 function test_formSample()
52 // setting form input.
53 $this->af->set('id', 1);
55 // {$action_name} ActionForm input validation.
56 $this->assertEqual($this->af->validate(), 0);
60 * TODO: write test case! :)
61 * @see http://simpletest.org/en/first_test_tutorial.html
62 * @see http://simpletest.org/en/unit_test_documentation.html
64 $this->fail('No Test! write Test!');
69 * {$action_name} Action testcase.
73 * @package {$project_id}
75 class {$action_class}_TestCase extends Ethna_UnitTestCase
79 * @var string Action name.
81 var $action_name = '{$action_name}';
90 $this->createActionForm(); // create ActionForm.
91 $this->createActionClass(); // create ActionClass.
93 $this->session->start(); // start session.
103 $this->session->destroy(); // destroy session.
107 * {$action_name} ActionClass sample testcase.
111 function test_actionSample()
114 // setting form input.
115 $this->af->set('id', 1);
117 // Authentication before processing {$action_name} Action.
118 $forward_name = $this->ac->authenticate();
119 $this->assertNull($forward_name);
121 // {$action_name} Action preprocess.
122 $forward_name = $this->ac->prepare();
123 $this->assertNull($forward_name);
125 // {$action_name} Action implementation.
126 $forward_name = $this->ac->perform();
127 $this->assertEqual($forward_name, '{$action_name}');
131 * TODO: write test case! :)
132 * @see http://simpletest.org/en/first_test_tutorial.html
133 * @see http://simpletest.org/en/unit_test_documentation.html
135 $this->fail('No Test! write Test!');