Skip to content

Commit 253a05f

Browse files
authored
Merge pull request PHP-DI#870 from williamdes/phpunit-10
Update tests for phpunit 10 compatibility
2 parents 91716b1 + ada609c commit 253a05f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
</testsuite>
1818
<testsuite name="integration">
1919
<directory>./tests/IntegrationTest/</directory>
20+
<exclude>./tests/IntegrationTest/BaseContainerTest.php</exclude>
2021
</testsuite>
2122
</testsuites>
2223

tests/IntegrationTest/BaseContainerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function setUp(): void
3232
parent::setUp();
3333
}
3434

35-
public function provideContainer() : array
35+
public static function provideContainer() : array
3636
{
3737
// Clear all files
3838
array_map('unlink', glob(self::COMPILATION_DIR . '/*'));

tests/IntegrationTest/Definitions/FactoryDefinitionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function test_closure_shortcut(ContainerBuilder $builder)
3939
$this->assertEquals('bar', $container->get('factory'));
4040
}
4141

42-
public function provideCallables(): array
42+
public static function provideCallables(): array
4343
{
4444
$callables = [
4545
'closure' => function () {
@@ -57,7 +57,7 @@ public function provideCallables(): array
5757

5858
$testCases = [];
5959
foreach ($callables as $callableName => $callable) {
60-
foreach ($this->provideContainer() as $containerName => $container) {
60+
foreach (self::provideContainer() as $containerName => $container) {
6161
$testCases[$containerName . ' - ' . $callableName] = [$callable, clone $container[0]];
6262
}
6363
}

0 commit comments

Comments
 (0)