本文整理汇总了PHP中PHP_CodeCoverage_Util::buildDirectoryStructure方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_CodeCoverage_Util::buildDirectoryStructure方法的具体用法?PHP PHP_CodeCoverage_Util::buildDirectoryStructure怎么用?PHP PHP_CodeCoverage_Util::buildDirectoryStructure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHP_CodeCoverage_Util
的用法示例。
在下文中一共展示了PHP_CodeCoverage_Util::buildDirectoryStructure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: testBuildDirectoryStructure
/**
* @covers PHP_CodeCoverage_Util::buildDirectoryStructure
*/
public function testBuildDirectoryStructure()
{
$this->assertEquals(array('src' => array('Money.php/f' => array(), 'MoneyBag.php/f' => array())), PHP_CodeCoverage_Util::buildDirectoryStructure(array('src/Money.php' => array(), 'src/MoneyBag.php' => array())));
}