"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/unit/Util/ConfigurationTest.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.

ConfigurationTest.php  (phpunit-9.0.0):ConfigurationTest.php  (phpunit-9.0.1)
skipping to change at line 611 skipping to change at line 611
$this->assertCount(1, $configuration); $this->assertCount(1, $configuration);
$first = $configuration->asArray()[0]; $first = $configuration->asArray()[0];
$this->assertSame('first', $first->name()); $this->assertSame('first', $first->name());
$this->assertCount(1, $first->directories()); $this->assertCount(1, $first->directories());
$this->assertSame(TEST_FILES_PATH . 'tests/first', $first->directories() ->asArray()[0]->path()); $this->assertSame(TEST_FILES_PATH . 'tests/first', $first->directories() ->asArray()[0]->path());
$this->assertSame('', $first->directories()->asArray()[0]->prefix()); $this->assertSame('', $first->directories()->asArray()[0]->prefix());
$this->assertSame('Test.php', $first->directories()->asArray()[0]->suffi x()); $this->assertSame('Test.php', $first->directories()->asArray()[0]->suffi x());
$this->assertSame(\PHP_VERSION, $first->directories()->asArray()[0]->php Version()); $this->assertSame(\PHP_VERSION, $first->directories()->asArray()[0]->php Version());
$this->assertSame('>=', $first->directories()->asArray()[0]->phpVersionO perator()); $this->assertSame('>=', $first->directories()->asArray()[0]->phpVersionO perator()->asString());
$this->assertCount(0, $first->files()); $this->assertCount(0, $first->files());
$this->assertCount(0, $first->exclude()); $this->assertCount(0, $first->exclude());
} }
public function testConfigurationForMultipleTestSuitesCanBeLoaded(): void public function testConfigurationForMultipleTestSuitesCanBeLoaded(): void
{ {
$configuration = Registry::getInstance()->get( $configuration = Registry::getInstance()->get(
TEST_FILES_PATH . 'configuration_testsuites.xml' TEST_FILES_PATH . 'configuration_testsuites.xml'
)->testSuite(); )->testSuite();
$this->assertCount(2, $configuration); $this->assertCount(2, $configuration);
$first = $configuration->asArray()[0]; $first = $configuration->asArray()[0];
$this->assertSame('first', $first->name()); $this->assertSame('first', $first->name());
$this->assertCount(1, $first->directories()); $this->assertCount(1, $first->directories());
$this->assertSame(TEST_FILES_PATH . 'tests/first', $first->directories() ->asArray()[0]->path()); $this->assertSame(TEST_FILES_PATH . 'tests/first', $first->directories() ->asArray()[0]->path());
$this->assertSame('', $first->directories()->asArray()[0]->prefix()); $this->assertSame('', $first->directories()->asArray()[0]->prefix());
$this->assertSame('Test.php', $first->directories()->asArray()[0]->suffi x()); $this->assertSame('Test.php', $first->directories()->asArray()[0]->suffi x());
$this->assertSame(\PHP_VERSION, $first->directories()->asArray()[0]->php Version()); $this->assertSame(\PHP_VERSION, $first->directories()->asArray()[0]->php Version());
$this->assertSame('>=', $first->directories()->asArray()[0]->phpVersionO perator()); $this->assertSame('>=', $first->directories()->asArray()[0]->phpVersionO perator()->asString());
$this->assertCount(0, $first->files()); $this->assertCount(0, $first->files());
$this->assertCount(0, $first->exclude()); $this->assertCount(0, $first->exclude());
$second = $configuration->asArray()[1]; $second = $configuration->asArray()[1];
$this->assertSame('second', $second->name()); $this->assertSame('second', $second->name());
$this->assertSame(TEST_FILES_PATH . 'tests/second', $second->directories ()->asArray()[0]->path()); $this->assertSame(TEST_FILES_PATH . 'tests/second', $second->directories ()->asArray()[0]->path());
$this->assertSame('test', $second->directories()->asArray()[0]->prefix() ); $this->assertSame('test', $second->directories()->asArray()[0]->prefix() );
$this->assertSame('.phpt', $second->directories()->asArray()[0]->suffix( )); $this->assertSame('.phpt', $second->directories()->asArray()[0]->suffix( ));
$this->assertSame('1.2.3', $second->directories()->asArray()[0]->phpVers ion()); $this->assertSame('1.2.3', $second->directories()->asArray()[0]->phpVers ion());
$this->assertSame('==', $second->directories()->asArray()[0]->phpVersion Operator()); $this->assertSame('==', $second->directories()->asArray()[0]->phpVersion Operator()->asString());
$this->assertCount(1, $second->files()); $this->assertCount(1, $second->files());
$this->assertSame(TEST_FILES_PATH . 'tests/file.php', $second->files()-> asArray()[0]->path()); $this->assertSame(TEST_FILES_PATH . 'tests/file.php', $second->files()-> asArray()[0]->path());
$this->assertSame('4.5.6', $second->files()->asArray()[0]->phpVersion()) ; $this->assertSame('4.5.6', $second->files()->asArray()[0]->phpVersion()) ;
$this->assertSame('!=', $second->files()->asArray()[0]->phpVersionOperat or()); $this->assertSame('!=', $second->files()->asArray()[0]->phpVersionOperat or()->asString());
$this->assertCount(1, $second->exclude()); $this->assertCount(1, $second->exclude());
$this->assertSame(TEST_FILES_PATH . 'tests/second/_files', $second->excl ude()->asArray()[0]->path()); $this->assertSame(TEST_FILES_PATH . 'tests/second/_files', $second->excl ude()->asArray()[0]->path());
} }
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

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