src/Adapter/Phpunit.php
private function assembleXmlConfiguration(Container $container, $firstRun = false, array $testSuites = [])
    {
        $configurationDir = $this->resolveConfigurationDir($container);
        $xmlConfigurationBuilder = new XmlConfigurationBuilder($configurationDir);

        if ($firstRun) {
            $xmlConfigurationBuilder->setPhpCoverage($container->getTempDirectory() . '/coverage.humbug.php');
            $xmlConfigurationBuilder->setTextCoverage($container->getTempDirectory() . '/coverage.humbug.txt');
            $xmlConfigurationBuilder->setJunitLog($container->getTempDirectory() . '/junit.humbug.xml');
            $whiteListSrc = $this->getWhiteListSrc($container);
            $excludeDirs = $this->getExcludeDirs($container);
            $xmlConfigurationBuilder->setCoverageFilter($whiteListSrc, $excludeDirs);
            $xmlConfigurationBuilder->setTimeCollectionListener($this->getPathToTimeCollectorFile($container));
        } else {
            $xmlConfigurationBuilder->setFilterListener($testSuites, $this->getPathToTimeCollectorFile($container));
        }

        $xmlConfigurationBuilder->setAcceleratorListener();
        $xmlConfiguration = $xmlConfigurationBuilder->getConfiguration();

        if ($xmlConfiguration->hasOriginalBootstrap()) {
            $container->setBootstrap($xmlConfiguration->getOriginalBootstrap());
        }
        return $xmlConfiguration;
    }
private function assembleXmlConfiguration(Container $container, $firstRun = false, array $testSuites = [])
    {
        $configurationDir = $this->resolveConfigurationDir($container);
        $xmlConfigurationBuilder = new XmlConfigurationBuilder($configurationDir);

        if ($firstRun) {
            $xmlConfigurationBuilder->setPhpCoverage($container->getTempDirectory() . '/coverage.humbug.php');
            $xmlConfigurationBuilder->setTextCoverage($container->getTempDirectory() . '/coverage.humbug.txt');
            $xmlConfigurationBuilder->setJunitLog($container->getTempDirectory() . '/junit.humbug.xml');
            $whiteListSrc = $this->getWhiteListSrc($container);
            $excludeDirs = $this->getExcludeDirs($container);
            $xmlConfigurationBuilder->setCoverageFilter($whiteListSrc, $excludeDirs);
            $xmlConfigurationBuilder->setTimeCollectionListener($this->getPathToTimeCollectorFile($container));
        } else {
            $xmlConfigurationBuilder->setFilterListener($testSuites, $this->getPathToTimeCollectorFile($container));
        }

        $xmlConfigurationBuilder->setAcceleratorListener();
        $xmlConfiguration = $xmlConfigurationBuilder->getConfiguration();

        if ($xmlConfiguration->hasOriginalBootstrap()) {
            $container->setBootstrap($xmlConfiguration->getOriginalBootstrap());
        }
        return $xmlConfiguration;
    }
Wrangle XML to create a PHPUnit configuration, based on the original, that
allows for more control over what tests are run, allows JUnit logging,
and ensures that Code Coverage (for Humbug use) whitelists all of the
relevant source code.


@return XmlConfiguration