Skip to content

Commit bca6550

Browse files
committed
Use named cases for the data provider for changelog tests
This makes it easier to identify which package has an invalid changelog as PHPUnit displays the name of the failing case in its output (which is easier to understand than figuring out which component has the index 23 in the data provider).
1 parent 7f172a1 commit bca6550

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/Unit/ChangelogTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ public static function provideChangedlogFiles(): iterable
172172
->in(\dirname(__DIR__, 2) . '/src')
173173
->name('CHANGELOG.md');
174174

175-
/** @var \SplFileInfo $file */
176175
foreach ($finder as $file) {
177-
yield [$file->getRealPath()];
176+
yield $file->getRelativePath() => [$file->getRealPath()];
178177
}
179178
}
180179

0 commit comments

Comments
 (0)