OSDN Git Service

- added temporary implementation of Ethna_View_FormHelper_Test
[ethna/ethna.git] / Idea_Extended_ViewClass / test / Ethna_View_FormHelper_Test.php
1 <?php
2 /**
3  *  Ethna_View_FormHelper_Test.php
4  *
5  *  @package Ethna
6  *  @author Yoshinari Takaoka <takaoka@beatcraft.com>
7  */
8
9 require_once ETHNA_INSTALL_BASE . '/test/Ethna_MockProject.php';
10
11 /**
12  *  Ethna_ViewClass のうち、フォームヘルパ
13  *  に関連するテストケースを集めたクラス
14  *
15  *  @package Ethna
16  *  @author Yoshinari Takaoka <takaoka@beatcraft.com>
17  *  @access public
18  */
19 class Ethna_View_FormHelper_Test extends Ethna_UnitTestBase
20 {
21     var $project;
22
23     function setUp()
24     {
25         $this->project =& new Ethna_MockProject();
26         $this->project->create();
27     }
28
29     function tearDown()
30     {
31         $this->project->delete();
32         unset($GLOBALS['_Ethna_controller']);
33     }
34
35     function test_formhelper_Textarea()
36     {
37         $action_name = $tpl_name = 'textareatest';
38         $action_skel = ETHNA_TEST_SKELDIR . 'skel.action.formhelper.php';
39         $this->project->runCmd('add-action',
40                                array(
41                                    '-s',
42                                    $action_skel,
43                                    $action_name,
44                                )
45         );
46         $tpl_skel = ETHNA_TEST_SKELTPLDIR . 'skel.template.textarea.tpl';
47         $this->project->runCmd('add-template',
48                                array(
49                                    '-s',
50                                    $tpl_skel,
51                                    $tpl_name,
52                                )
53         );
54         $submit_value = array(
55             'textarea_setactval' => 'input',
56         );
57         $result = $this->project->runMain($action_name, $submit_value);
58
59         //  TODO: assert output
60     }
61 }
62
63 ?>