3 class HTMLPurifier_SimpleTest_Reporter
extends HTMLReporter
8 public function __construct($encoding, $ac)
11 parent
::__construct($encoding);
14 public function paintHeader($test_name)
16 parent
::paintHeader($test_name);
18 <form action
="" method
="get" id
="select">
20 <option value
="" style
="font-weight:bold;"<?php
if(!$this->ac
['file']) {echo ' selected';} ?
>>All Tests
</option
>
21 <?php
foreach($GLOBALS['HTMLPurifierTest']['Files'] as $file) { ?
>
22 <option value
="<?php echo $file ?>"<?php
23 if ($this->ac
['file'] == $file) echo ' selected';
24 ?
>><?php
echo $file ?
></option
>
27 <input type
="checkbox" name
="standalone" value
="1" title
="Standalone version?" <?php
if($this->ac
['standalone']) {echo 'checked="checked" ';} ?
>/>
28 <input type
="submit" value
="Go">
34 public function paintFooter($test_name)
36 if (function_exists('xdebug_peak_memory_usage')) {
37 $max_mem = number_format(xdebug_peak_memory_usage());
38 echo "<div>Max memory usage: $max_mem bytes</div>";
40 parent
::paintFooter($test_name);
43 protected function getCss()
45 $css = parent
::getCss();
47 #select {position:absolute;top:0.2em;right:0.2em;}
52 public function getTestList()
54 // hacky; depends on a specific implementation of paintPass, etc.
55 $list = parent
::getTestList();
57 if (class_exists($testcase, false)) $file = str_replace('_', '/', $testcase) . '.php';
58 else $file = $testcase;
59 $list[1] = '<a href="index.php?file=' . $file . '">' . $testcase . '</a>';