From 7965a91ae5cafecfb3842936ad5fc70033d05039 Mon Sep 17 00:00:00 2001 From: "Moritz Schubotz (physikerwelt)" Date: Sat, 21 Oct 2023 22:56:26 +0200 Subject: [PATCH] Make dataProvider in PopupTest static Bug: T337160 Change-Id: I1c5384d319d9e34397ed4d94b4d9888d46722b91 --- tests/phpunit/unit/PopupTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/unit/PopupTest.php b/tests/phpunit/unit/PopupTest.php index 9bef15e83..9881fd5b0 100644 --- a/tests/phpunit/unit/PopupTest.php +++ b/tests/phpunit/unit/PopupTest.php @@ -63,7 +63,8 @@ class PopupTest extends MathWikibaseConnectorTestFactory { /** * @dataProvider provideItemSetups */ - public function testExistingId( Item $item ) { + public function testExistingId( bool $hasPart ) { + $item = $this->setupMassEnergyEquivalenceItem( $hasPart ); $popupHandler = $this->getPopup( null, null, $item ); $request = $this->getRequest( '1', 'en' ); @@ -134,10 +135,10 @@ class PopupTest extends MathWikibaseConnectorTestFactory { return new Popup( $mathWikibaseConnectorMock, $languageFactoryMock, $languageNameUtilsMock, $titleFactoryMock ); } - public function provideItemSetups(): array { + public static function provideItemSetups(): array { return [ - [ $this->setupMassEnergyEquivalenceItem( true ) ], - [ $this->setupMassEnergyEquivalenceItem( false ) ], + [ true ], + [ false ], ]; } }