cvs: pear /HTML_Table/tests 24.phpt

From: Date: Tue, 24 Apr 2007 11:40:31 +0000
Subject: cvs: pear /HTML_Table/tests 24.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-46125@lists.php.net to get a copy of this message
wiesemann Tue Apr 24 11:40:31 2007 UTC Modified files: /pear/HTML_Table/tests 24.phpt Log: - test 24 didn't make sense (invalid (X)HTML code and not useful); now tests new feature (multiple tbodies) http://cvs.php.net/viewvc.cgi/pear/HTML_Table/tests/24.phpt?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_Table/tests/24.phpt diff -u pear/HTML_Table/tests/24.phpt:1.1 pear/HTML_Table/tests/24.phpt:1.2 --- pear/HTML_Table/tests/24.phpt:1.1 Sun Nov 27 19:25:03 2005 +++ pear/HTML_Table/tests/24.phpt Tue Apr 24 11:40:31 2007 @@ -1,20 +1,28 @@ --TEST-- -24.phpt: thead, tfoot and addRow (tbody not in output) +24.phpt: thead, tfoot, 2 tbodies (with ids) and addRow --FILE-- <?php -// $Id: 24.phpt,v 1.1 2005/11/27 19:25:03 wiesemann Exp $ +// $Id: 24.phpt,v 1.2 2007/04/24 11:40:31 wiesemann Exp $ require_once 'HTML/Table.php'; $table =& new HTML_Table(); $thead =& $table->getHeader(); $tfoot =& $table->getFooter(); +$tbody1 =& $table->getBody(1); +$tbody1->setAttribute('id', 'tbody1'); + +$tbody2 =& $table->getBody(2); +$tbody2->setAttribute('id', 'tbody2'); + $data[0][] = 'Test'; $data[1][] = 'Test'; foreach($data as $key => $value) { $thead->addRow($value); $tfoot->addRow($value); + $tbody1->addRow($value); + $tbody2->addRow($value); } // output @@ -38,4 +46,20 @@ <td>Test</td> </tr> </tfoot> + <tbody id="tbody1"> + <tr> + <td>Test</td> + </tr> + <tr> + <td>Test</td> + </tr> + </tbody> + <tbody id="tbody2"> + <tr> + <td>Test</td> + </tr> + <tr> + <td>Test</td> + </tr> + </tbody> </table> \ No newline at end of file

« previous php.pear.cvs (#46125) next »