本文整理汇总了PHP中TestSuite::getTestCases方法的典型用法代码示例。如果您正苦于以下问题:PHP TestSuite::getTestCases方法的具体用法?PHP TestSuite::getTestCases怎么用?PHP TestSuite::getTestCases使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestSuite
的用法示例。
在下文中一共展示了TestSuite::getTestCases方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchTestsuites
/**
* Search testsuite files
*
* @return Array
*/
function searchTestsuites()
{
$testsuites = array();
$dir = $this->getTestSuitesLocation();
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (!in_array($file, array('.', '..'))) {
if (!is_dir("{$dir}/{$file}")) {
$testSuite = new TestSuite(substr($file, 0, -3));
$testCases = $testSuite->getTestCases();
$testCasesStr = implode(',', $testCases);
$testsuites[$file] = $testCasesStr;
}
}
}
closedir($dh);
}
}
return $testsuites;
}
示例2: TestSuite
if (isset($parameters["numbered"])) {
$output .= " " . $index . "-";
}
$output .= " " . $testcase . "\n";
}
echo $output;
}
break;
case 'generate':
if ($displayHelp) {
echo "generate: Generate a testsuite.\nParameters:\n --name : Name of the new testsuite\n --old_testsuite : Name of an old testsuite from which we import the list of testcases\n --testcases : List of indexes of testcases as obtained from \"testcases\" function\n --help or -h : Display this help\n --quiet or -q : Quiet mode\nNB: You can't use both --old_testsuite and --testcases\n";
} else {
if (isset($parameters["name"]) && !empty($parameters["name"])) {
if (isset($parameters["old_testsuite"]) && !empty($parameters["old_testsuite"]) && !isset($parameters["testcases"])) {
$oldTestSuite = new TestSuite($parameters["old_testsuite"]);
$testCases = $oldTestSuite->getTestCases();
} elseif (isset($parameters["testcases"]) && !empty($parameters["testcases"]) && !isset($parameters["old_testsuite"])) {
$testCasesNumbers = split(",", $parameters["testcases"]);
$testCaseManager = new TestCaseManager();
$testCasesList = $testCaseManager->listFileSystem("../testcases");
$testCases = array();
foreach ($testCasesNumbers as $number) {
if (isset($testCasesList[$number])) {
$testCases[] = $testCasesList[$number];
} else {
if (!$quiet) {
echo "\"" . $number . "\" is not a valid testcase index, to verify your input, try\n>php tic.php testcases --numbered\n";
}
}
}
} else {