Skip to content

Commit

Permalink
Merge pull request #870 from williamdes/phpunit-10
Browse files Browse the repository at this point in the history
Update tests for phpunit 10 compatibility
  • Loading branch information
mnapoli committed Apr 18, 2024
2 parents 91716b1 + ada609c commit 253a05f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</testsuite>
<testsuite name="integration">
<directory>./tests/IntegrationTest/</directory>
<exclude>./tests/IntegrationTest/BaseContainerTest.php</exclude>
</testsuite>
</testsuites>

Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest/BaseContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function setUp(): void
parent::setUp();
}

public function provideContainer() : array
public static function provideContainer() : array
{
// Clear all files
array_map('unlink', glob(self::COMPILATION_DIR . '/*'));
Expand Down
4 changes: 2 additions & 2 deletions tests/IntegrationTest/Definitions/FactoryDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function test_closure_shortcut(ContainerBuilder $builder)
$this->assertEquals('bar', $container->get('factory'));
}

public function provideCallables(): array
public static function provideCallables(): array
{
$callables = [
'closure' => function () {
Expand All @@ -57,7 +57,7 @@ public function provideCallables(): array

$testCases = [];
foreach ($callables as $callableName => $callable) {
foreach ($this->provideContainer() as $containerName => $container) {
foreach (self::provideContainer() as $containerName => $container) {
$testCases[$containerName . ' - ' . $callableName] = [$callable, clone $container[0]];
}
}
Expand Down

0 comments on commit 253a05f

Please sign in to comment.