Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | $HOME = realpath(dirname(__FILE__)) . "/../../../.."; |
---|
4 | require_once($HOME . "/tests/class/Common_TestCase.php"); |
---|
5 | /** |
---|
6 | * |
---|
7 | */ |
---|
8 | class SC_Utils_getTableTagTest extends Common_TestCase { |
---|
9 | |
---|
10 | protected function setUp() { |
---|
11 | parent::setUp(); |
---|
12 | } |
---|
13 | |
---|
14 | protected function tearDown() { |
---|
15 | parent::tearDown(); |
---|
16 | } |
---|
17 | |
---|
18 | ///////////////////////////////////////// |
---|
19 | // TODO 要確認(現在は使われていないが、ソースコードの意味が不明確) |
---|
20 | public function testGetTableTag__配列の内容がHTMLに変換される() { |
---|
21 | $this->expected = |
---|
22 | '<table>' . |
---|
23 | '<tr><th>名前</th><th>住所</th><th>電話番号</th></tr>' . |
---|
24 | '<tr><td>名前1</td><td>住所1</td><td>12345678901</td></tr>' . |
---|
25 | '<tr><td>名前2</td><td>住所2</td><td>12345678902</td></tr>' . |
---|
26 | '<tr><td>名前3</td><td>住所3</td><td>12345678903</td></tr>' . |
---|
27 | '</table>'; |
---|
28 | $this->actual = SC_Utils::getTableTag(array( |
---|
29 | array('名前', '住所', '電話番号'), |
---|
30 | array('名前1', '住所1', '12345678901'), |
---|
31 | array('名前2', '住所2', '12345678902'), |
---|
32 | array('名前2', '住所3', '12345678903'), |
---|
33 | )); |
---|
34 | |
---|
35 | $this->verify('生成されたHTML'); |
---|
36 | } |
---|
37 | |
---|
38 | } |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.