Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 41 lines (37 sloc) 0.573 kB
55664eb tests for thead/tfoot/tbody support
Mark Wiesemann authored
1 --TEST--
2 25.phpt: tbody, tfoot and addRow (thead not in output)
3 --FILE--
4 <?php
5 // $Id$
6 require_once 'HTML/Table.php';
e1c7a95 - Request #16984: added a __toString() method, i.e. "echo $table;" is…
Mark Wiesemann authored
7 $table = new HTML_Table();
55664eb tests for thead/tfoot/tbody support
Mark Wiesemann authored
8
9 $tbody =& $table->getBody();
10 $tfoot =& $table->getFooter();
11
12 $data[0][] = 'Test';
13 $data[1][] = 'Test';
14
15 foreach($data as $key => $value) {
16 $tbody->addRow($value);
17 $tfoot->addRow($value);
18 }
19
20 // output
21 echo $table->toHTML();
22 ?>
23 --EXPECT--
24 <table>
25 <tfoot>
26 <tr>
27 <td>Test</td>
28 </tr>
29 <tr>
30 <td>Test</td>
31 </tr>
32 </tfoot>
33 <tbody>
34 <tr>
35 <td>Test</td>
36 </tr>
37 <tr>
38 <td>Test</td>
39 </tr>
40 </tbody>
41 </table>
Something went wrong with that request. Please try again.