From 3f66667abd7475ed8e5a6882b0d09d62a26d62f1 Mon Sep 17 00:00:00 2001 From: paladox Date: Thu, 16 Jan 2025 16:09:26 +0000 Subject: [PATCH 1/3] Fix for MW 1.43 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > │ TypeError: MediaWiki\Api\ApiBase::__construct(): Argument #2 ($moduleName) must be of type string, null given, called in /var/www/html/extensions/KnowledgeGraph/tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php on line 11 Changed in [0]. [0] https://github.com/wikimedia/mediawiki/commit/1145328459f74043727456253894d9168473cb8f#diff-dfdd0dae9f9ed19e37ff6da63da042be73458adf8bda6151258aca1cd9a5ac86 --- tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php index 96b9b3e..c92bb31 100644 --- a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php +++ b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadCategoriesTest.php @@ -8,7 +8,7 @@ class KnowledgeGraphApiLoadCategoriesTest extends TestCase { * @covers KnowledgeGraphApiLoadCategories::getExamplesMessages */ public function testGetExamples() { - $instance = new KnowledgeGraphApiLoadCategories( new ApiMain(), null ); + $instance = new KnowledgeGraphApiLoadCategories( new ApiMain(), '' ); $messages = $instance->getExamplesMessages(); $this->assertCount( 1, $messages ); } From a44081f8fe0aaf2081fc58cc05611f684506ab07 Mon Sep 17 00:00:00 2001 From: paladox Date: Thu, 16 Jan 2025 16:12:21 +0000 Subject: [PATCH 2/3] Update KnowledgeGraphApiLoadNodesTest.php --- tests/phpunit/Unit/api/KnowledgeGraphApiLoadNodesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadNodesTest.php b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadNodesTest.php index 6120588..8cb610e 100644 --- a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadNodesTest.php +++ b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadNodesTest.php @@ -8,7 +8,7 @@ class KnowledgeGraphApiLoadNodesTest extends TestCase { * @covers KnowledgeGraphApiLoadNodes::getExamplesMessages */ public function testGetExamples() { - $instance = new KnowledgeGraphApiLoadNodes( new ApiMain(), null ); + $instance = new KnowledgeGraphApiLoadNodes( new ApiMain(), '' ); $messages = $instance->getExamplesMessages(); $this->assertCount( 1, $messages ); } From 7912e2658e21357ad7c613600f4e5bdc97332474 Mon Sep 17 00:00:00 2001 From: paladox Date: Thu, 16 Jan 2025 16:14:24 +0000 Subject: [PATCH 3/3] Update KnowledgeGraphApiLoadPropertiesTest.php --- tests/phpunit/Unit/api/KnowledgeGraphApiLoadPropertiesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadPropertiesTest.php b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadPropertiesTest.php index 775dccd..4e68a6d 100644 --- a/tests/phpunit/Unit/api/KnowledgeGraphApiLoadPropertiesTest.php +++ b/tests/phpunit/Unit/api/KnowledgeGraphApiLoadPropertiesTest.php @@ -8,7 +8,7 @@ class KnowledgeGraphApiLoadPropertiesTest extends TestCase { * @covers KnowledgeGraphApiLoadProperties::getExamplesMessages */ public function testGetExamples() { - $instance = new KnowledgeGraphApiLoadProperties( new ApiMain(), null ); + $instance = new KnowledgeGraphApiLoadProperties( new ApiMain(), '' ); $messages = $instance->getExamplesMessages(); $this->assertCount( 1, $messages ); }