From: Timo Tijhof Date: Tue, 2 Jul 2019 18:48:20 +0000 (+0100) Subject: tests: Use a fancy generator provider in ReleaseNotesTest X-Git-Tag: 1.34.0-rc.0~1199^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=215c1f8ecc00d72de71f20ff1db68ba4956bcb69;p=lhc%2Fweb%2Fwiklou.git tests: Use a fancy generator provider in ReleaseNotesTest Follows-up ffc23ee333fffb. Change-Id: I99bf0d7115f6d2a84eb499d104d9cd227331c20f --- diff --git a/tests/phpunit/documentation/ReleaseNotesTest.php b/tests/phpunit/documentation/ReleaseNotesTest.php index 3ac69ae270..acbb04a6e0 100644 --- a/tests/phpunit/documentation/ReleaseNotesTest.php +++ b/tests/phpunit/documentation/ReleaseNotesTest.php @@ -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" );