当前位置: 首页>>代码示例>>PHP>>正文


PHP TestManager::runAllTests方法代码示例

本文整理汇总了PHP中TestManager::runAllTests方法的典型用法代码示例。如果您正苦于以下问题:PHP TestManager::runAllTests方法的具体用法?PHP TestManager::runAllTests怎么用?PHP TestManager::runAllTests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestManager的用法示例。


在下文中一共展示了TestManager::runAllTests方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRunAllTests

 /**
  * testRunAllTests method
  *
  * @return void
  * @access public
  */
 function testRunAllTests()
 {
     $folder = new Folder($this->Sut->_getTestsPath());
     $extension = str_replace('.', '\\.', TestManager::getExtension('test'));
     $out = $folder->findRecursive('.*' . $extension);
     $reporter = new CakeHtmlReporter();
     $list = TestManager::runAllTests($reporter, true);
     $this->assertEqual(count($out), count($list));
 }
开发者ID:robksawyer,项目名称:cakephp2x,代码行数:15,代码来源:test_manager.test.php

示例2: main

 function main()
 {
     $this->doCoverage = in_array('cov', $this->args);
     App::import('Lib', 'Ci.JunitReporter');
     $this->_startCoverage('Clover Shell');
     $Manager = new TestManager();
     $Manager->appTest = true;
     $Manager->pluginTest = null;
     $Reporter =& new JunitReporter(null, array('app' => $Manager->appTest, 'plugin' => $Manager->pluginTest, 'group' => $this->type === 'group', 'codeCoverage' => false, 'coverage' => $this->_coverage));
     $this->out(__('Running app all', true));
     $result = $Manager->runAllTests($Reporter);
     $Manager->appTest = false;
     $plugins = App::objects('plugin', APP . 'plugins' . DS, false);
     foreach ($plugins as $plugin) {
         $Manager->pluginTest = $plugin;
         $Reporter =& new JunitReporter(null, array('app' => $Manager->appTest, 'plugin' => $Manager->pluginTest, 'group' => $this->type === 'group', 'codeCoverage' => false, 'coverage' => $this->_coverage));
         $this->hr();
         $plugin = Inflector::underscore($plugin);
         $this->out(sprintf(__('Running %s all', true), $plugin));
         $result = $result && $Manager->runAllTests($Reporter);
     }
     $this->_stopCoverage();
     return $result;
 }
开发者ID:rodrigorm,项目名称:ci,代码行数:24,代码来源:ci_testsuite.php

示例3: CakePHPTestSuiteFooter

}
function CakePHPTestSuiteFooter()
{
    switch (CAKE_TEST_OUTPUT) {
        case CAKE_TEST_OUTPUT_HTML:
            $baseUrl = BASE;
            include CAKE . 'tests' . DS . 'lib' . DS . 'footer.php';
            break;
    }
}
CakePHPTestHeader();
CakePHPTestSuiteHeader();
define('RUN_TEST_LINK', $_SERVER['PHP_SELF']);
if (isset($_GET['group'])) {
    if ('all' == $_GET['group']) {
        TestManager::runAllTests(CakeTestsGetReporter());
    } else {
        if (isset($_GET['app'])) {
            TestManager::runGroupTest(ucfirst($_GET['group']), APP_TEST_GROUPS, CakeTestsGetReporter());
        } else {
            TestManager::runGroupTest(ucfirst($_GET['group']), CORE_TEST_GROUPS, CakeTestsGetReporter());
        }
    }
    CakePHPTestRunMore();
    CakePHPTestSuiteFooter();
    exit;
}
if (isset($_GET['case'])) {
    TestManager::runTestCase($_GET['case'], CakeTestsGetReporter());
    CakePHPTestRunMore();
    CakePHPTestSuiteFooter();
开发者ID:rhencke,项目名称:mozilla-cvs-history,代码行数:31,代码来源:test.php

示例4: ob_start

* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
ob_start();
require_once LIMB_DIR . '/tests/lib/test_utils.php';
require_once LIMB_DIR . '/tests/lib/test_manager.php';
if (!(include_once SIMPLE_TEST . 'reporter.php')) {
    error('runtime', 'LIBRARY_REQUIRED', array('library' => 'Simple Test', 'path' => SIMPLE_TEST));
}
if (isset($_GET['all'])) {
    TestManager::runAllTests($_GET['all'], new HTMLReporter());
    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Run more tests</a></p>";
    echo debug::parse_html_console();
    ob_end_flush();
    exit(0);
}
if (isset($_GET['group'])) {
    TestManager::runGroupTest(ucfirst($_GET['group']), $_GET['group'], new HTMLReporter());
    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "'>Run more tests</a></p>";
    echo debug::parse_html_console();
    ob_end_flush();
    exit(0);
}
if (isset($_GET['case'])) {
    TestManager::runTestCase($_GET['case'], new HTMLReporter());
    echo "<p><a href='" . $_SERVER['PHP_SELF'] . "?show=cases'>Run more tests</a></p>";
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:index.php

示例5: _runTest

 /**
  * Executes the tests depending on $testToRun
  */
 function _runTest()
 {
     // Need to set some get variables as TestManager depends on them
     if (in_array($this->testToRun['section'], $this->plugins)) {
         $_GET['plugin'] = $this->testToRun['section'];
     } elseif (in_array(Inflector::Humanize($this->testToRun['section']), $this->plugins)) {
         $_GET['plugin'] = Inflector::Humanize($this->testToRun['section']);
     } elseif ($this->testToRun['section'] == 'app') {
         $_GET['app'] = true;
     }
     if ($this->testToRun['area'] == 'all') {
         TestManager::runAllTests(new TextReporter());
         return;
     } elseif ($this->testToRun['area'] == 'group') {
         $_GET['group'] == $this->testToRun['file'];
         if (isset($_GET['app'])) {
             TestManager::runGroupTest(ucfirst($_GET['group']), APP_TEST_GROUPS, new TextReporter());
         } elseif (isset($_GET['plugin'])) {
             TestManager::runGroupTest(ucfirst($_GET['group']), APP . 'plugins' . DS . $_GET['plugin'] . DS . 'tests' . DS . 'groups', new TextReporter());
         } else {
             TestManager::runGroupTest(ucfirst($_GET['group']), CORE_TEST_GROUPS, new TextReporter());
         }
         return;
     } else {
         $_GET['case'] = 'cases' . DS . $this->testToRun['type'] . DS . $this->testToRun['file'] . '.test.php';
         TestManager::runTestCase($_GET['case'], new TextReporter());
         return;
     }
 }
开发者ID:kaz0636,项目名称:openflp,代码行数:32,代码来源:testsuite.php

示例6: __run

 /**
  * Executes the tests depending on our settings
  *
  * @return void
  * @access private
  */
 function __run()
 {
     $reporter = new CLIReporter();
     $this->__setGetVars();
     if ($this->type == 'all') {
         return TestManager::runAllTests($reporter);
     }
     if ($this->doCoverage) {
         if (!extension_loaded('xdebug')) {
             $this->out('You must install Xdebug to use the CakePHP(tm) Code Coverage Analyzation. Download it from http://www.xdebug.org/docs/install');
             exit(0);
         }
     }
     if ($this->type == 'group') {
         $ucFirstGroup = ucfirst($this->file);
         $path = CORE_TEST_GROUPS;
         if ($this->category == 'app') {
             $path = APP_TEST_GROUPS;
         } elseif ($this->isPluginTest) {
             $path = APP . 'plugins' . DS . $this->category . DS . 'tests' . DS . 'groups';
         }
         if ($this->doCoverage) {
             require_once CAKE . 'tests' . DS . 'lib' . DS . 'code_coverage_manager.php';
             CodeCoverageManager::start($ucFirstGroup, $reporter);
         }
         $result = TestManager::runGroupTest($ucFirstGroup, $reporter);
         if ($this->doCoverage) {
             CodeCoverageManager::report();
         }
         return $result;
     }
     $case = 'libs' . DS . $this->file . '.test.php';
     if ($this->category == 'app') {
         $case = $this->file . '.test.php';
     } elseif ($this->isPluginTest) {
         $case = $this->file . '.test.php';
     }
     if ($this->doCoverage) {
         require_once CAKE . 'tests' . DS . 'lib' . DS . 'code_coverage_manager.php';
         CodeCoverageManager::start($case, $reporter);
     }
     $result = TestManager::runTestCase($case, $reporter);
     if ($this->doCoverage) {
         CodeCoverageManager::report();
     }
     return $result;
 }
开发者ID:laiello,项目名称:myopensources,代码行数:53,代码来源:testsuite.php

示例7: error

                }
                break;
        }
    }
}
if (!@(include_once SIMPLE_TEST . 'runner.php')) {
    error('runtime', 'LIBRARY_REQUIRED', array('library' => 'Simple Test', 'path' => SIMPLE_TEST));
}
require_once LIMB_DIR . '/tests/lib/cli_reporter.php';
/* list grouptests */
if ($opt_list) {
    echo CLITestManager::getGroupTestList(TEST_GROUPS_DIR);
    echo CLITestManager::getTestCaseList(TEST_CASES_DIR);
    exit(0);
}
/* run a test case */
if ($opt_casefile) {
    TestManager::runTestCase($opt_casefile, new CLIReporter($opt_separator));
    echo debug::parse_cli_console();
    exit(0);
}
/* run a grouptest */
if ($opt_groupfile) {
    TestManager::runGroupTest($opt_groupfile, TEST_GROUPS_DIR, new CLIReporter($opt_separator));
    echo debug::parse_cli_console();
    exit(0);
}
/* run all tests */
TestManager::runAllTests(new CLIReporter($opt_separator));
echo debug::parse_cli_console();
exit(0);
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:runtests.php

示例8:

            break;
        case DW_TESTS_OUTPUT_HTML:
        default:
            $footer = <<<EOD
  </body>
</html>
EOD;
            echo $footer;
            break;
    }
}
/** OUTPUT STARTS HERE **/
// If it's a group test
if (isset($_GET['group'])) {
    if ('all' == $_GET['group']) {
        TestManager::runAllTests(DW_TESTS_GetReporter());
    } else {
        TestManager::runGroupTest(ucfirst($_GET['group']), TEST_GROUPS, DW_TESTS_GetReporter());
    }
    DW_TESTS_PaintRunMore();
    exit;
}
// If it's a single test case
if (isset($_GET['case'])) {
    TestManager::runTestCase($_GET['case'], TEST_CASES, DW_TESTS_GetReporter());
    DW_TESTS_PaintRunMore();
    exit;
}
// Else it's the main page
DW_TESTS_PaintHeader();
DW_TESTS_PaintSuiteHeader();
开发者ID:pyfun,项目名称:dokuwiki,代码行数:31,代码来源:index.php

示例9: runAllTests

 public function runAllTests(&$reporter)
 {
     $this->_uninstalldb4test($this->database['host'], $this->database['port'], $this->database['login'], $this->database['pwd'], $this->database['name'], $this->database['type']);
     $this->_installdb4test($this->database['host'], $this->database['port'], $this->database['login'], $this->database['pwd'], $this->database['name'], $this->database['type']);
     parent::runAllTests($reporter);
 }
开发者ID:kitware,项目名称:cdash,代码行数:6,代码来源:kw_test_manager.php


注:本文中的TestManager::runAllTests方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。