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


PHP PHP_CodeCoverage_Util::getDirectory方法代码示例

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


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

示例1: testGetDirectory3

 /**
  * @covers            PHP_CodeCoverage_Util::getDirectory
  * @expectedException RuntimeException
  */
 public function testGetDirectory3()
 {
     if (!class_exists('vfsStream')) {
         $this->markTestSkipped('vfsStream is not installed');
     }
     PHP_CodeCoverage_Util::getDirectory(vfsStream::url('/not/existing/path'));
 }
开发者ID:reflectivedevelopment,项目名称:jfh-lib,代码行数:11,代码来源:UtilTest.php

示例2: process

 /**
  * @param PHP_CodeCoverage $coverage
  * @param string           $target
  */
 public function process(PHP_CodeCoverage $coverage, $target)
 {
     $target = PHP_CodeCoverage_Util::getDirectory($target);
     $files = $coverage->getSummary();
     $commonPath = PHP_CodeCoverage_Util::reducePaths($files);
     $items = PHP_CodeCoverage_Util::buildDirectoryStructure($files);
     $root = new PHP_CodeCoverage_Report_HTML_Node_Directory($commonPath, NULL);
     $this->addItems($root, $items, $files);
     $this->renderDashboard($root, $target . 'index.dashboard.html', $this->options['title']);
     foreach ($root as $node) {
         if ($node instanceof PHP_CodeCoverage_Report_HTML_Node_Directory) {
             $this->renderDashboard($node, $target . PHP_CodeCoverage_Util::getSafeFilename($node->getId()) . '.dashboard.html', $node->getName(TRUE));
         }
     }
     $root->render($target, $this->options['title'], $this->options['charset'], $this->options['lowUpperBound'], $this->options['highLowerBound'], $this->options['generator']);
     $this->copyFiles($target);
 }
开发者ID:redlion09,项目名称:pcppi,代码行数:21,代码来源:HTML.php

示例3: process

 /**
  * @param PHP_CodeCoverage $coverage
  * @param string           $target
  */
 public function process(PHP_CodeCoverage $coverage, $target)
 {
     $target = PHP_CodeCoverage_Util::getDirectory($target);
     $report = $coverage->getReport();
     unset($coverage);
     if (!isset($_SERVER['REQUEST_TIME'])) {
         $_SERVER['REQUEST_TIME'] = time();
     }
     $date = date('D M j G:i:s T Y', $_SERVER['REQUEST_TIME']);
     $dashboard = new PHP_CodeCoverage_Report_HTML_Renderer_Dashboard($this->templatePath, $this->charset, $this->generator, $date, $this->lowUpperBound, $this->highLowerBound);
     $directory = new PHP_CodeCoverage_Report_HTML_Renderer_Directory($this->templatePath, $this->charset, $this->generator, $date, $this->lowUpperBound, $this->highLowerBound);
     $file = new PHP_CodeCoverage_Report_HTML_Renderer_File($this->templatePath, $this->charset, $this->generator, $date, $this->lowUpperBound, $this->highLowerBound, $this->highlight, $this->yui);
     $dashboard->render($report, $target . 'index.dashboard.html', $this->title);
     $directory->render($report, $target . 'index.html', $this->title);
     foreach ($report as $node) {
         $id = $node->getId();
         if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) {
             $dashboard->render($node, $target . $id . '.dashboard.html');
             $directory->render($node, $target . $id . '.html');
         } else {
             $file->render($node, $target . $id . '.html');
         }
     }
     $this->copyFiles($target);
 }
开发者ID:nizarbey,项目名称:phpunit-all-in-one,代码行数:29,代码来源:HTML.php


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