示例#1
0
 /**
  * Returns a list of available test cases in a text-friendly format
  *
  * @access public
  */
 function &getTestCaseList()
 {
     $manager = new TextTestManager();
     $testCases = $manager->_getTestCaseList($manager->_getTestsPath());
     $buffer = "Core Test Cases:\n";
     $urlExtra = '';
     if ($manager->appTest) {
         $buffer = "App Test Cases:\n";
         $urlExtra = '&app=true';
     } else {
         if ($manager->pluginTest) {
             $buffer = Inflector::humanize($manager->pluginTest) . " Test Cases:\n";
             $urlExtra = '&plugin=' . $manager->pluginTest;
         }
     }
     if (1 > count($testCases)) {
         $buffer .= "EMPTY";
         return $buffer;
     }
     foreach ($testCases as $testCaseFile => $testCase) {
         $buffer .= $_SERVER['SERVER_NAME'] . $manager->getBaseURL() . "?case=" . $testCase . "&output=txt" . "\n";
     }
     $buffer .= "\n";
     return $buffer;
 }
示例#2
0
function CakePHPTestGroupTestList()
{
    switch (CAKE_TEST_OUTPUT) {
        case CAKE_TEST_OUTPUT_HTML:
            if (isset($_GET['app'])) {
                echo HtmlTestManager::getGroupTestList(APP_TEST_GROUPS);
            } else {
                echo HtmlTestManager::getGroupTestList(CORE_TEST_GROUPS);
            }
            break;
        case CAKE_TEST_OUTPUT_TEXT:
        default:
            if (isset($_GET['app'])) {
                echo TextTestManager::getGroupTestList(APP_TEST_GROUPS);
            } else {
                echo TextTestManager::getGroupTestList(CORE_TEST_GROUPS);
            }
            break;
    }
}
 /**
  * Prints a list of group tests
  *
  * @return void
  * @access public
  */
 function CakePHPTestGroupTestList()
 {
     switch (CAKE_TEST_OUTPUT) {
         case CAKE_TEST_OUTPUT_HTML:
             echo HtmlTestManager::getGroupTestList();
             break;
         case CAKE_TEST_OUTPUT_TEXT:
         default:
             echo TextTestManager::getGroupTestList();
             break;
     }
 }