[3.1.1] Memory optimizations for ConfigSchema. Changes include:
[htmlpurifier/rdancer.git] / tests / HTMLPurifier / SimpleTest / Reporter.php
blob2dcff79e29d170e5dc958c4a342e71f7c803d511
1 <?php
3 class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
6 protected $ac;
8 public function __construct($encoding, $ac) {
9 $this->ac = $ac;
10 parent::__construct($encoding);
13 public function paintHeader($test_name) {
14 parent::paintHeader($test_name);
16 <form action="" method="get" id="select">
17 <select name="f">
18 <option value="" style="font-weight:bold;"<?php if(!$this->ac['file']) {echo ' selected';} ?>>All Tests</option>
19 <?php foreach($GLOBALS['HTMLPurifierTest']['Files'] as $file) { ?>
20 <option value="<?php echo $file ?>"<?php
21 if ($this->ac['file'] == $file) echo ' selected';
22 ?>><?php echo $file ?></option>
23 <?php } ?>
24 </select>
25 <input type="checkbox" name="standalone" value="1" title="Standalone version?" <?php if($this->ac['standalone']) {echo 'checked="checked" ';} ?>/>
26 <input type="submit" value="Go">
27 </form>
28 <?php
29 flush();
32 public function paintFooter($test_name) {
33 if (function_exists('xdebug_peak_memory_usage')) {
34 $max_mem = number_format(xdebug_peak_memory_usage());
35 echo "<div>Max memory usage: $max_mem bytes</div>";
37 parent::paintFooter($test_name);
40 protected function getCss() {
41 $css = parent::getCss();
42 $css .= '
43 #select {position:absolute;top:0.2em;right:0.2em;}
45 return $css;