当前位置: 首页>>代码示例>>PHP>>正文


PHP TestFinder::run方法代码示例

本文整理汇总了PHP中TestFinder::run方法的典型用法代码示例。如果您正苦于以下问题:PHP TestFinder::run方法的具体用法?PHP TestFinder::run怎么用?PHP TestFinder::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestFinder的用法示例。


在下文中一共展示了TestFinder::run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onCommand

 public function onCommand(CommandEvent $event)
 {
     if ($event->cmd == "help") {
         print "  test [extension]\n";
         print "    run automated tests for the name extension\n\n";
     }
     if ($event->cmd == "test") {
         $all = new TestFinder($event->args[0]);
         $all->run(new SCoreCLIReporter());
     }
 }
开发者ID:JarJak,项目名称:shimmie2,代码行数:11,代码来源:main.php

示例2: onPageRequest

 public function onPageRequest($event)
 {
     global $page;
     if ($event->page_matches("test")) {
         set_time_limit(0);
         $page->set_title("Test Results");
         $page->set_heading("Test Results");
         $page->add_block(new NavBlock());
         $all = new TestFinder($event->get_arg(0));
         $all->run(new SCoreReporter($page));
     }
 }
开发者ID:kmcasto,项目名称:shimmie2,代码行数:12,代码来源:main.php

示例3: Database

    require_once $filename;
}
// We also need to pull in the SimpleTest extension.
require_once 'ext/simpletest/main.php';
// connect to the database
$database = new Database();
$config = new DatabaseConfig($database);
// load the theme parts
foreach (_get_themelet_files(get_theme()) as $themelet) {
    require_once $themelet;
}
_load_extensions();
// Fire off the InitExtEvent()
$page = class_exists("CustomPage") ? new CustomPage() : new Page();
$user = _get_user();
send_event(new InitExtEvent());
// Put the database into autocommit mode for making the users.
$database->commit();
// Create the necessary users for the tests.
$userPage = new UserPage();
$userPage->onUserCreation(new UserCreationEvent("demo", "demo", ""));
$userPage->onUserCreation(new UserCreationEvent("test", "test", ""));
// Fire off the InitExtEvent() again after we have made the users.
$page = class_exists("CustomPage") ? new CustomPage() : new Page();
$user = _get_user();
send_event(new InitExtEvent());
// Now we can actually run all the tests.
$all = new TestFinder("");
$results = $all->run(new TextReporter());
// Travis-CI needs to know the results of the tests.
exit($results ? 0 : 1);
开发者ID:JarJak,项目名称:shimmie2,代码行数:31,代码来源:test_all.php


注:本文中的TestFinder::run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。