diff --git a/tests/unit/Differ/DiffCollectorTest.php b/tests/unit/Differ/DiffCollectorTest.php index 365e6c4..9ab401c 100644 --- a/tests/unit/Differ/DiffCollectorTest.php +++ b/tests/unit/Differ/DiffCollectorTest.php @@ -124,7 +124,7 @@ public function getDiffFiles(string $baseCommit, string $headCommit): array * @param bool $includeNonAstChanged whether to include non AST-changed PhpDiffs * @param GitInterface $git the GitInterface instance */ - #[DataProvider('getPhpDiffsAstChangedProvider')] + #[DataProvider('provideGetPhpDiffsAstChangedCases')] public function testGetPhpDiffsAstChanged(int $expectCount, bool $includeNonAstChanged, GitInterface $git, DiffFactory $diffFactory): void { $subject = $this->getSubject(git: $git, diffFactory: $diffFactory); @@ -135,7 +135,10 @@ public function testGetPhpDiffsAstChanged(int $expectCount, bool $includeNonAstC $this->assertCount($expectCount, $actual); } - public static function getPhpDiffsAstChangedProvider(): \Generator + /** + * @return iterable + */ + public static function provideGetPhpDiffsAstChangedCases(): iterable { $git = new class extends DummyGit { public function getDiffFiles(string $baseCommit, string $headCommit): array diff --git a/tests/unit/Differ/DiffFactoryTest.php b/tests/unit/Differ/DiffFactoryTest.php index 943e9b5..c467dd3 100644 --- a/tests/unit/Differ/DiffFactoryTest.php +++ b/tests/unit/Differ/DiffFactoryTest.php @@ -31,7 +31,7 @@ public function testCreateForNonPhp(): void $this->assertSame($status, $diff->status); } - #[DataProvider('createForPhpProvider')] + #[DataProvider('provideCreateForPhpCases')] public function testCreateForPhp(GitStatus $gitStatus, ?string $expectedBase, ?string $expectedHead): void { $git = new class extends DummyGit { @@ -56,7 +56,10 @@ public function get(string $source): string $this->assertSame($expectedHead, $actual->head); } - public static function createForPhpProvider(): \Generator + /** + * @return iterable + */ + public static function provideCreateForPhpCases(): iterable { yield 'ADDED' => [GitStatus::ADDED, null, '