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


PHP CodeCoverageManager::getInstance方法代码示例

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


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

示例1: __getTestFilesPath

 /**
  * Gets us the base path to look for the test files
  *
  * @param string $isApp
  * @return void
  * @access public
  */
 function __getTestFilesPath($isApp = true)
 {
     $manager = CodeCoverageManager::getInstance();
     $path = ROOT . DS;
     if ($isApp) {
         $path .= APP_DIR . DS;
     } elseif (!!$manager->pluginTest) {
         $pluginPath = APP . 'plugins' . DS . $manager->pluginTest . DS;
         $pluginPaths = Configure::read('pluginPaths');
         foreach ($pluginPaths as $tmpPath) {
             $tmpPath = $tmpPath . $manager->pluginTest . DS;
             if (file_exists($tmpPath)) {
                 $pluginPath = $tmpPath;
                 break;
             }
         }
         $path = $pluginPath;
     } else {
         $path = TEST_CAKE_CORE_INCLUDE_PATH;
     }
     return $path;
 }
开发者ID:BGCX067,项目名称:fambom-svn-to-git,代码行数:29,代码来源:code_coverage_manager.php

示例2: testCalculateCodeCoverage

 /**
  * testCalculateCodeCoverage method
  *
  * @access public
  * @return void
  */
 function testCalculateCodeCoverage()
 {
     $manager =& CodeCoverageManager::getInstance();
     $data = array('25' => array(100, 25), '50' => array(100, 50), '0' => array(0, 0), '0' => array(100, 0), '100' => array(100, 100));
     foreach ($data as $coverage => $lines) {
         $this->assertEqual($coverage, $manager->__calcCoverage($lines[0], $lines[1]));
     }
     $manager->__calcCoverage(100, 1000);
     $this->assertError();
 }
开发者ID:acerato,项目名称:cntcetp,代码行数:16,代码来源:code_coverage_manager.test.php

示例3: __getTestFilesPath

 /**
  * Gets us the base path to look for the test files
  *
  * @param string $isApp
  * @return void
  * @access public
  */
 function __getTestFilesPath($isApp = true)
 {
     $manager = CodeCoverageManager::getInstance();
     $path = ROOT . DS;
     if ($isApp) {
         $path .= APP_DIR . DS;
     } elseif (!!$manager->pluginTest) {
         $path .= APP_DIR . DS . 'plugins' . DS . $manager->pluginTest . DS;
     } else {
         $path = TEST_CAKE_CORE_INCLUDE_PATH;
     }
     return $path;
 }
开发者ID:BLisa90,项目名称:cakecart,代码行数:20,代码来源:code_coverage_manager.php


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