"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/TextUI/Configuration/Loader.php" between
phpunit-9.0.0.tar.gz and phpunit-9.0.1.tar.gz

About: PHPUnit is a unit testing software framework for software written in PHP.

Loader.php  (phpunit-9.0.0):Loader.php  (phpunit-9.0.1)
skipping to change at line 29 skipping to change at line 29
use PHPUnit\TextUI\Configuration\Logging\Junit; use PHPUnit\TextUI\Configuration\Logging\Junit;
use PHPUnit\TextUI\Configuration\Logging\Logging; use PHPUnit\TextUI\Configuration\Logging\Logging;
use PHPUnit\TextUI\Configuration\Logging\PlainText; use PHPUnit\TextUI\Configuration\Logging\PlainText;
use PHPUnit\TextUI\Configuration\Logging\TeamCity; use PHPUnit\TextUI\Configuration\Logging\TeamCity;
use PHPUnit\TextUI\Configuration\Logging\TestDox\Html as TestDoxHtml; use PHPUnit\TextUI\Configuration\Logging\TestDox\Html as TestDoxHtml;
use PHPUnit\TextUI\Configuration\Logging\TestDox\Text as TestDoxText; use PHPUnit\TextUI\Configuration\Logging\TestDox\Text as TestDoxText;
use PHPUnit\TextUI\Configuration\Logging\TestDox\Xml as TestDoxXml; use PHPUnit\TextUI\Configuration\Logging\TestDox\Xml as TestDoxXml;
use PHPUnit\TextUI\Configuration\TestSuite as TestSuiteConfiguration; use PHPUnit\TextUI\Configuration\TestSuite as TestSuiteConfiguration;
use PHPUnit\TextUI\DefaultResultPrinter; use PHPUnit\TextUI\DefaultResultPrinter;
use PHPUnit\Util\TestDox\CliTestDoxPrinter; use PHPUnit\Util\TestDox\CliTestDoxPrinter;
use PHPUnit\Util\VersionComparisonOperator;
use PHPUnit\Util\Xml; use PHPUnit\Util\Xml;
/** /**
* @internal This class is not covered by the backward compatibility promise for PHPUnit * @internal This class is not covered by the backward compatibility promise for PHPUnit
*/ */
final class Loader final class Loader
{ {
public function load(string $filename): Configuration public function load(string $filename): Configuration
{ {
$document = Xml::loadFile($filename, false, true, true); $document = Xml::loadFile($filename, false, true, true);
skipping to change at line 822 skipping to change at line 823
if ($directoryNode->hasAttribute('suffix')) { if ($directoryNode->hasAttribute('suffix')) {
$suffix = (string) $directoryNode->getAttribute('suffix'); $suffix = (string) $directoryNode->getAttribute('suffix');
} }
$phpVersion = \PHP_VERSION; $phpVersion = \PHP_VERSION;
if ($directoryNode->hasAttribute('phpVersion')) { if ($directoryNode->hasAttribute('phpVersion')) {
$phpVersion = (string) $directoryNode->getAttribute('phpVers ion'); $phpVersion = (string) $directoryNode->getAttribute('phpVers ion');
} }
$phpVersionOperator = '>='; $phpVersionOperator = new VersionComparisonOperator('>=');
if ($directoryNode->hasAttribute('phpVersionOperator')) { if ($directoryNode->hasAttribute('phpVersionOperator')) {
$phpVersionOperator = (string) $directoryNode->getAttribute( 'phpVersionOperator'); $phpVersionOperator = new VersionComparisonOperator((string) $directoryNode->getAttribute('phpVersionOperator'));
} }
$directories[] = new TestDirectory( $directories[] = new TestDirectory(
$this->toAbsolutePath($filename, $directory), $this->toAbsolutePath($filename, $directory),
$prefix, $prefix,
$suffix, $suffix,
$phpVersion, $phpVersion,
$phpVersionOperator $phpVersionOperator
); );
} }
skipping to change at line 854 skipping to change at line 855
if (empty($file)) { if (empty($file)) {
continue; continue;
} }
$phpVersion = \PHP_VERSION; $phpVersion = \PHP_VERSION;
if ($fileNode->hasAttribute('phpVersion')) { if ($fileNode->hasAttribute('phpVersion')) {
$phpVersion = (string) $fileNode->getAttribute('phpVersion') ; $phpVersion = (string) $fileNode->getAttribute('phpVersion') ;
} }
$phpVersionOperator = '>='; $phpVersionOperator = new VersionComparisonOperator('>=');
if ($fileNode->hasAttribute('phpVersionOperator')) { if ($fileNode->hasAttribute('phpVersionOperator')) {
$phpVersionOperator = (string) $fileNode->getAttribute('phpV ersionOperator'); $phpVersionOperator = new VersionComparisonOperator((string) $fileNode->getAttribute('phpVersionOperator'));
} }
$files[] = new TestFile( $files[] = new TestFile(
$this->toAbsolutePath($filename, $file), $this->toAbsolutePath($filename, $file),
$phpVersion, $phpVersion,
$phpVersionOperator $phpVersionOperator
); );
} }
$testSuites[] = new TestSuiteConfiguration( $testSuites[] = new TestSuiteConfiguration(
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)