tests: Use a fancy generator provider in ReleaseNotesTest
Follows-up ffc23ee333.
Change-Id: I99bf0d7115f6d2a84eb499d104d9cd227331c20f
This commit is contained in:
parent
ffc23ee333
commit
215c1f8ecc
1 changed files with 4 additions and 5 deletions
|
|
@ -46,11 +46,9 @@ class ReleaseNotesTest extends MediaWikiTestCase {
|
|||
"SECURITY",
|
||||
];
|
||||
|
||||
$testCases = [];
|
||||
foreach ( $rootFiles as $rootFile ) {
|
||||
$testCases["$rootFile file"] = [ "$IP/$rootFile" ];
|
||||
yield "$rootFile file" => [ "$IP/$rootFile" ];
|
||||
}
|
||||
return $testCases;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -82,9 +80,10 @@ class ReleaseNotesTest extends MediaWikiTestCase {
|
|||
}
|
||||
$errors[] = "line $num: length $length > $max_length:\n$line";
|
||||
}
|
||||
# Using assertSame() to show the full line
|
||||
# Use assertSame() instead of assertEqual(), to show the full line in the diff
|
||||
$this->assertSame(
|
||||
[], $errors,
|
||||
[],
|
||||
$errors,
|
||||
"$type file '$fileName' lines " .
|
||||
"have at most $max_length characters"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue