當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TestManager::getTestCaseList方法代碼示例

本文整理匯總了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;
 }
開發者ID:no2key,項目名稱:Web-Framework-Benchmark,代碼行數:11,代碼來源:cake_base_reporter.php

示例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;
 }
開發者ID:vinicius-ianni,項目名稱:PHPMyScrum,代碼行數:11,代碼來源:cake_base_reporter.php

示例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;
         }
     }
 }
開發者ID:no2key,項目名稱:Web-Framework-Benchmark,代碼行數:53,代碼來源:testsuite.php


注:本文中的TestManager::getTestCaseList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。