Example #1
0
<?php

document::begin('html/4.01');
?>
<html lang="en-us">
    <head>
        <title><?php 
echo LEPTON_PLATFORM_ID;
?>
</title>
    </head>
    <body>
    	<h1>Test results</h1>
    	<?	using('lepton.utils.tests'); ?>
    	<?	using('tests.*'); ?>
    	<?	using('app.tests.*'); ?>
    	<?	
    		class HtmlReporter extends TestReporter {
    			function beginGroup($title) {
    				printf('<h2>%s</h2>',$title);
    				printf('<table><tr>');
    				foreach(array(
    					'Test' => 50,
    					'Text' => 300,
    					'Status' => 90
    				) as $title=>$width) printf('<th width="%d">%s</th>', $width, $title);
    				printf('</tr>');
    			}
    			function addItem($index,$text,$status) {
    				printf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>', $index, $text, $status);
    			}
Example #2
0
 static function begindocument($doctype = 'html/4.01')
 {
     document::begin($doctype);
     printf("<html lang=\"%s\">\n", 'en-us');
 }