本文整理汇总了PHP中AllTests::run方法的典型用法代码示例。如果您正苦于以下问题:PHP AllTests::run方法的具体用法?PHP AllTests::run怎么用?PHP AllTests::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AllTests
的用法示例。
在下文中一共展示了AllTests::run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AllTests
<?php
// $Id: all_tests.php,v 1.2 2004/08/16 08:55:24 hfuecks Exp $
require_once 'simple_include.php';
require_once 'calendar_include.php';
define("TEST_RUNNING", true);
require_once './calendar_tests.php';
require_once './calendar_tabular_tests.php';
require_once './validator_tests.php';
require_once './calendar_engine_tests.php';
require_once './calendar_engine_tests.php';
require_once './table_helper_tests.php';
require_once './decorator_tests.php';
require_once './util_tests.php';
class AllTests extends GroupTest
{
function AllTests()
{
$this->GroupTest('All PEAR::Calendar Tests');
$this->AddTestCase(new CalendarTests());
$this->AddTestCase(new CalendarTabularTests());
$this->AddTestCase(new ValidatorTests());
$this->AddTestCase(new CalendarEngineTests());
$this->AddTestCase(new TableHelperTests());
$this->AddTestCase(new DecoratorTests());
$this->AddTestCase(new UtilTests());
}
}
$test = new AllTests();
$test->run(new HtmlReporter());
示例2: define
<?php
// $Id$
if (!defined('TEST')) {
define('TEST', __FILE__);
}
require_once dirname(__FILE__) . '/test_groups.php';
require_once dirname(__FILE__) . '/../reporter.php';
$test = new AllTests();
if (SimpleReporter::inCli()) {
$result = $test->run(new SelectiveReporter(new TextReporter(), @$argv[1], @$argv[2]));
return $result ? 0 : 1;
}
$test->run(new SelectiveReporter(new HtmlReporter(), @$_GET['c'], @$_GET['t']));
示例3: paintPass
}
}
class ShowSimplePasses extends TextReporter
{
var $lastfile = '';
function paintPass($message)
{
parent::paintPass($message);
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
if ($this->lastfile != $breadcrumb[0]) {
print "{$breadcrumb['0']}\n";
$this->lastfile = $breadcrumb[0];
}
array_shift($breadcrumb);
print "\t" . implode(":", $breadcrumb) . ": OK\n";
//print ": $message\n";
}
}
class AllTests extends TestSuite
{
function AllTests()
{
$this->TestSuite('All tests');
$this->addFile('tests/activerecord.php');
// $this->addFile('tests/livetest.php');
}
}
$test = new AllTests();
$test->run(new ShowSimplePasses());