getRootUrl() public method

public getRootUrl ( )
Exemplo n.º 1
0
 public function testSetRootUrl()
 {
     $this->if($field = new testedClass(uniqid(), uniqid(), uniqid()))->then->object($field->setRootUrl($rootUrl = uniqid()))->isIdenticalTo($field)->string($field->getRootUrl())->isIdenticalTo($rootUrl)->object($field->setRootUrl($rootUrl = rand(1, PHP_INT_MAX)))->isIdenticalTo($field)->string($field->getRootUrl())->isIdenticalTo((string) $rootUrl)->object($field->setRootUrl(($rootUrl = uniqid()) . '/'))->isIdenticalTo($field)->string($field->getRootUrl())->isIdenticalTo($rootUrl . '/');
 }
Exemplo n.º 2
0
    }
}
my_mkdir($path);
my_mkdir($path . DIRECTORY_SEPARATOR . 'cover');
my_mkdir($path . DIRECTORY_SEPARATOR . 'treemap');
$report = $script->addDefaultReport();
$runner->setBootstrapFile(__DIR__ . DIRECTORY_SEPARATOR . '.bootstrap.atoum.php');
$runner->addTestsFromDirectory(__DIR__ . DIRECTORY_SEPARATOR . 'website' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'units' . DIRECTORY_SEPARATOR);
//$script->addDefaultReport();
$xunitWriter = new atoum\writers\file('build/atoum.xunit.xml');
$xunitReport = new atoum\reports\asynchronous\xunit();
$xunitReport->addWriter($xunitWriter);
$runner->addReport($xunitReport);
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageHtmlField = new atoum\report\fields\runner\coverage\html('markattaks', 'build/atoum/cover');
/*
Please replace in next line http://url/of/web/site by the root url of your code coverage web site.
*/
$coverageHtmlField->setRootUrl('http://m2gl.deptinfo-st.univ-fcomte.fr:9080/jenkins/job/MarkAttacks%20(w-o%20Squash%20TA)/PHP_Coverage');
// Treemap (not mandatory)
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageTreemapField = new atoum\report\fields\runner\coverage\treemap('markattaks', 'build/atoum/treemap');
/*
Please replace in next line http://url/of/treemap by the root url of your treemap web site.
*/
$coverageTreemapField->setTreemapUrl('http://m2gl.deptinfo-st.univ-fcomte.fr:9080/jenkins/job/MarkAttacks%20(w-o%20Squash%20TA)/PHP_Coverage_treemap')->setHtmlReportBaseUrl($coverageHtmlField->getRootUrl());
$script->addDefaultReport()->addField($coverageHtmlField)->addField($coverageTreemapField);
Exemplo n.º 3
0
<?php

/*
Sample atoum configuration file to have code coverage in html format and the treemap.
Do "php path/to/test/file -c path/to/this/file" or "php path/to/atoum/scripts/runner.php -c path/to/this/file -f path/to/test/file" to use it.
*/
use mageekguy\atoum;
// HTML
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageHtmlField = new atoum\report\fields\runner\coverage\html('Queue Client', 'codeCoverage');
/*
Please replace in next line http://url/of/web/site by the root url of your code coverage web site.
*/
$coverageHtmlField->setRootUrl('/');
// Treemap (not mandatory)
/*
Please replace in next line /path/to/destination/directory by your destination directory path for html files.
*/
$coverageTreemapField = new atoum\report\fields\runner\coverage\treemap('Queue Client', 'codeCoverage');
/*
Please replace in next line http://url/of/treemap by the root url of your treemap web site.
*/
$coverageTreemapField->setTreemapUrl('')->setHtmlReportBaseUrl($coverageHtmlField->getRootUrl());
$script->addDefaultReport()->addField($coverageHtmlField)->addField($coverageTreemapField);
$cloverWriter = new atoum\writers\file('coverage.xml');
$cloverReport = new atoum\reports\asynchronous\clover();
$cloverReport->addWriter($cloverWriter);
$runner->addReport($cloverReport);