當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。