本文整理汇总了PHP中TestManager::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP TestManager::setup方法的具体用法?PHP TestManager::setup怎么用?PHP TestManager::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestManager
的用法示例。
在下文中一共展示了TestManager::setup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
$conf['lang'] = 'en';
define('TEST_ROOT', dirname(__FILE__));
define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/');
error_reporting(E_ALL);
set_time_limit(600);
ini_set('memory_limit', '128M');
/* Used to determine output to display */
define('DW_TESTS_OUTPUT_HTML', 1);
define('DW_TESTS_OUTPUT_XML', 2);
if (isset($_GET['output']) && $_GET['output'] == 'xml') {
define('DW_TESTS_OUTPUT', DW_TESTS_OUTPUT_XML);
} else {
define('DW_TESTS_OUTPUT', DW_TESTS_OUTPUT_HTML);
}
require_once 'lib/testmanager.php';
TestManager::setup('tests.ini');
if (!defined('SIMPLE_TEST')) {
define('SIMPLE_TEST', ConfigManager::getOptionAsPath('tests', 'simpletest', 'library_path'));
}
if (!@(include_once SIMPLE_TEST . 'reporter.php')) {
RaiseError('runtime', 'LIBRARY_REQUIRED', array('library' => 'Simple Test', 'path' => SIMPLE_TEST));
}
function &DW_TESTS_GetReporter()
{
static $Reporter = NULL;
if (!$Reporter) {
switch (DW_TESTS_OUTPUT) {
case DW_TESTS_OUTPUT_XML:
require_once SIMPLE_TEST . 'xml.php';
$Reporter = new XmlReporter();
break;
示例2: ini_set
#!/usr/bin/php -q
<?php
ini_set('memory_limit', '128M');
if (!defined('DOKU_INC')) {
define('DOKU_INC', realpath(dirname(__FILE__) . '/../') . '/');
}
define('DOKU_UNITTEST', true);
require_once DOKU_INC . 'inc/init.php';
require_once DOKU_INC . 'inc/events.php';
define('TEST_ROOT', dirname(__FILE__));
define('TMPL_FILESCHEME_PATH', TEST_ROOT . '/filescheme/');
error_reporting(E_ALL ^ E_NOTICE);
require_once 'lib/testmanager.php';
TestManager::setup();
function usage()
{
$usage = <<<EOD
Usage: ./runtests.php [OPTION]...
Run the Dokuwiki unit tests. If ALL of the test cases pass a count of total
passes is printed on STDOUT. If ANY of the test cases fail (or raise
errors) details are printed on STDERR and this script returns a non-zero
exit code.
-c --case=NAME specify a test case by it's ID (see -i for list)
-f --file=NAME specify a test case file (full or relative path)
-g --group=NAME specify a grouptest. If no grouptest is
specified, all test cases will be run.
-i --caselist list individual test cases by their ID
-l --grouplist list available grouptests
-s, --separator=SEP set the character(s) used to separate fail
details to SEP
-p, --path path to SimpleTest installation