Tobias Gritschacher has submitted this change and it was merged. Change subject: Get rid of bad usage of MediaWikiTestCase in the Wikibase\Database component ......................................................................
Get rid of bad usage of MediaWikiTestCase in the Wikibase\Database component Change-Id: If801e2629b6b0ebf54c66634084d736e2c10a49c --- M Database/tests/phpunit/FieldDefinitionTest.php M Database/tests/phpunit/MWDB/ExtendedAbstractionTest.php M Database/tests/phpunit/MediaWikiQueryInterfaceTest.php M Database/tests/phpunit/TableBuilderTest.php M Database/tests/phpunit/TableDefinitionTest.php 5 files changed, 44 insertions(+), 22 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, approved jenkins-bot: Verified diff --git a/Database/tests/phpunit/FieldDefinitionTest.php b/Database/tests/phpunit/FieldDefinitionTest.php index 17d0bd4..9f43e80 100644 --- a/Database/tests/phpunit/FieldDefinitionTest.php +++ b/Database/tests/phpunit/FieldDefinitionTest.php @@ -34,7 +34,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -class FieldDefinitionTest extends \MediaWikiTestCase { +class FieldDefinitionTest extends \PHPUnit_Framework_TestCase { public function instanceProvider() { $instances = array(); @@ -75,7 +75,13 @@ true ); - return $this->arrayWrap( $instances ); + $argLists = array(); + + foreach ( $instances as $instance ) { + $argLists[] = array( $instance ); + } + + return $argLists; } /** diff --git a/Database/tests/phpunit/MWDB/ExtendedAbstractionTest.php b/Database/tests/phpunit/MWDB/ExtendedAbstractionTest.php index ee8c443..939c664 100644 --- a/Database/tests/phpunit/MWDB/ExtendedAbstractionTest.php +++ b/Database/tests/phpunit/MWDB/ExtendedAbstractionTest.php @@ -32,7 +32,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -abstract class ExtendedAbstractionTest extends \MediaWikiTestCase { +abstract class ExtendedAbstractionTest extends \PHPUnit_Framework_TestCase { /** * @return ExtendedAbstraction @@ -74,7 +74,13 @@ new FieldDefinition( 'textfield', FieldDefinition::TYPE_TEXT, false ), ) ); - return $this->arrayWrap( $tables ); + $argLists = array(); + + foreach ( $tables as $table ) { + $argLists[] = array( $table ); + } + + return $argLists; } /** diff --git a/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php b/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php index 7537b53..aee3861 100644 --- a/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php +++ b/Database/tests/phpunit/MediaWikiQueryInterfaceTest.php @@ -39,7 +39,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -class MediaWikiQueryInterfaceTest extends \MediaWikiTestCase { +class MediaWikiQueryInterfaceTest extends \PHPUnit_Framework_TestCase { /** * @return QueryInterface @@ -151,7 +151,13 @@ new FieldDefinition( 'textfield', FieldDefinition::TYPE_TEXT, false ), ) ); - return $this->arrayWrap( $tables ); + $argLists = array(); + + foreach ( $tables as $table ) { + $argLists[] = array( $table ); + } + + return $argLists; } /** @@ -351,4 +357,4 @@ } -} \ No newline at end of file +} diff --git a/Database/tests/phpunit/TableBuilderTest.php b/Database/tests/phpunit/TableBuilderTest.php index 3c741e3..343491e 100644 --- a/Database/tests/phpunit/TableBuilderTest.php +++ b/Database/tests/phpunit/TableBuilderTest.php @@ -37,19 +37,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -class TableBuilderTest extends \MediaWikiTestCase { - - public function tableNameProvider() { - return $this->arrayWrap( - array( - 'foo', - 'bar', - 'o', - 'foo_bar_baz', - 'foobarbaz', - ) - ); - } +class TableBuilderTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider tableNameProvider @@ -73,4 +61,14 @@ $builder->createTable( $table ); } + public function tableNameProvider() { + return array( + array( 'foo' ), + array( 'bar' ), + array( 'o' ), + array( 'foo_bar_baz' ), + array( 'foobarbaz ' ), + ); + } + } diff --git a/Database/tests/phpunit/TableDefinitionTest.php b/Database/tests/phpunit/TableDefinitionTest.php index 3f4c7c8..851e01d 100644 --- a/Database/tests/phpunit/TableDefinitionTest.php +++ b/Database/tests/phpunit/TableDefinitionTest.php @@ -35,7 +35,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -class TableDefinitionTest extends \MediaWikiTestCase { +class TableDefinitionTest extends \PHPUnit_Framework_TestCase { public function instanceProvider() { $instances = array(); @@ -56,7 +56,13 @@ ) ); - return $this->arrayWrap( $instances ); + $argLists = array(); + + foreach ( $instances as $instance ) { + $argLists[] = array( $instance ); + } + + return $argLists; } /** -- To view, visit https://gerrit.wikimedia.org/r/63656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If801e2629b6b0ebf54c66634084d736e2c10a49c Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: Anja Jentzsch <[email protected]> Gerrit-Reviewer: Ataherivand <[email protected]> Gerrit-Reviewer: Aude <[email protected]> Gerrit-Reviewer: Daniel Kinzler <[email protected]> Gerrit-Reviewer: Daniel Werner <[email protected]> Gerrit-Reviewer: Denny Vrandecic <[email protected]> Gerrit-Reviewer: Henning Snater <[email protected]> Gerrit-Reviewer: Jens Ohlig <[email protected]> Gerrit-Reviewer: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: John Erling Blad <[email protected]> Gerrit-Reviewer: Lydia Pintscher <[email protected]> Gerrit-Reviewer: Markus Kroetzsch <[email protected]> Gerrit-Reviewer: Nikola Smolenski <[email protected]> Gerrit-Reviewer: Silke Meyer <[email protected]> Gerrit-Reviewer: Tobias Gritschacher <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
