File: test.php

package info (click to toggle)
php-html-template-it 1.10-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 232 kB
  • ctags: 461
  • sloc: php: 952; makefile: 28
file content (30 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
$testcases = array(
    'ITX_api_testcase',
    'ITX_usage_testcase'
);
// use these if you want to check only base HTML_Template_IT functionality
if(false)
$testcases = array(
    'IT_api_testcase',
    'IT_usage_testcase'
);

require_once 'PHPUnit/TestSuite.php';
require_once 'HTML/Template/ITX.php';

$suite =& new PHPUnit_TestSuite();

foreach ($testcases as $testcase) {
    include_once $testcase . '.php';
    $methods = preg_grep('/^test/', get_class_methods($testcase));
    foreach ($methods as $method) {
        $suite->addTest(new $testcase($method));
    }
}

require_once 'Console_TestListener.php';
$result =& new PHPUnit_TestResult();
$result->addListener(new Console_TestListener);
$suite->run($result);
?>