Skip to content

Commit 467fe26

Browse files
authored
Use named cases for the data provider for changelog tests (#1880)
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 2ccbb81 commit 467fe26

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)