jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/345786 )
Change subject: tests: Set name for data provider data sets ...................................................................... tests: Set name for data provider data sets Move test names into array keys so that errors are reported as "data set edge_cases" instead of "data set #3". It also shows up in the coverage report, which makes things easier to debug. Change-Id: Ie377b2198c6408345fb78f3494543e14ede14b4a --- M tests/IPSetTest.php 1 file changed, 14 insertions(+), 11 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/IPSetTest.php b/tests/IPSetTest.php index d90a802..9494776 100644 --- a/tests/IPSetTest.php +++ b/tests/IPSetTest.php @@ -38,9 +38,8 @@ * an array of IP => expected (boolean) result against the config dataset. */ public static function provideIPSets() { - return array( - array( - 'old_list_subset', + $testcases = array( + 'old_list_subset' => array( array( '208.80.152.162', '10.64.0.123', @@ -98,8 +97,7 @@ '2620:0:862:1:26b6:fdff:fef5:abb5' => false, ), ), - array( - 'new_cidr_set', + 'new_cidr_set' => array( array( '208.80.154.0/26', '2620:0:861:1::/64', @@ -145,8 +143,7 @@ '2620:0:862:102:10:20:0:113' => true, ), ), - array( - 'empty_set', + 'empty_set' => array( array(), array( '0.0.0.0' => false, @@ -168,8 +165,7 @@ '2620:0:862:102:10:20:0:113' => false, ), ), - array( - 'edge_cases', + 'edge_cases' => array( array( '0.0.0.0', '255.255.255.255', @@ -207,8 +203,7 @@ '10.10.11.0' => false, ), ), - array( - 'exercise_optimizer', + 'exercise_optimizer' => array( array( 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:0/112', 'ffff:ffff:ffff:ffff:ffff:ffff:fffe:0/112', @@ -264,6 +259,14 @@ ), ), ); + foreach ( $testcases as $desc => $pairs ) { + $testcases[$desc] = array( + $desc, + $pairs[0], + $pairs[1], + ); + } + return $testcases; } /** -- To view, visit https://gerrit.wikimedia.org/r/345786 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie377b2198c6408345fb78f3494543e14ede14b4a Gerrit-PatchSet: 1 Gerrit-Project: IPSet Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits