本文整理汇总了PHP中TestManager::getTestCaseList方法的典型用法代码示例。如果您正苦于以下问题:PHP TestManager::getTestCaseList方法的具体用法?PHP TestManager::getTestCaseList怎么用?PHP TestManager::getTestCaseList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestManager
的用法示例。
在下文中一共展示了TestManager::getTestCaseList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCaseList
/**
* Retrieves a list of test cases from the active Manager class,
* displaying it in the correct format for the reporter subclass
*
* @return mixed
*/
public function testCaseList()
{
$testList = TestManager::getTestCaseList($this->params);
return $testList;
}
示例2: testCaseList
/**
* Retrieves a list of test cases from the active Manager class,
* displaying it in the correct format for the reporter subclass
*
* @return mixed
*/
function testCaseList()
{
$testList = TestManager::getTestCaseList();
return $testList;
}
示例3: available
/**
* Shows a list of available test cases and gives the option to run one of them
*
* @return void
*/
public function available()
{
$params = $this->parseArgs();
$testCases = TestManager::getTestCaseList($params);
$app = $params['app'];
$plugin = $params['plugin'];
$title = "Core Test Cases:";
$category = 'core';
if ($app) {
$title = "App Test Cases:";
$category = 'app';
} elseif ($plugin) {
$title = Inflector::humanize($plugin) . " Test Cases:";
$category = $plugin;
}
if (empty($testCases)) {
$this->out(__("No test cases available \n\n"));
return $this->out($this->OptionParser->help());
}
$this->out($title);
$i = 1;
$cases = array();
foreach ($testCases as $testCaseFile => $testCase) {
$case = explode(DS, str_replace('.test.php', '', $testCase));
$case[count($case) - 1] = Inflector::camelize($case[count($case) - 1]);
$case = implode('/', $case);
$this->out("[{$i}] {$case}");
$cases[$i] = $case;
$i++;
}
while ($choice = $this->in(__('What test case would you like to run?'), null, 'q')) {
if (is_numeric($choice) && isset($cases[$choice])) {
$this->args[0] = $category;
$this->args[1] = $cases[$choice];
$this->run($this->parseArgs(), $this->runnerOptions());
break;
}
if (is_string($choice) && in_array($choice, $cases)) {
$this->args[0] = $category;
$this->args[1] = $choice;
$this->run($this->parseArgs(), $this->runnerOptions());
break;
}
if ($choice == 'q') {
break;
}
}
}