PHPUnit::run()
PHPUnit::run() – runs a TestSuite and returns a TestResult object.
Synopsis
require_once 'PHPUnit.php';
object PHPUnit::run (
object $suite
)
Описание
Executes the given test suite
Parameter
-
object $suite
- an object of PHPUnit_TestSuite
Return value
&PHPUnit_Result
- A reference to a
PHPUnit_Result.
Пример
Using PHPUnit::run()
<?php
require_once "PHPUnit.php";
$suite = New PHPUnit_TestSuite('Mathtest');
$result = PHPUnit::run($suite);
echo $result->toHtml();
?>