Skip to content

Fix failing integration tests for MW 1.40 #885

Open
@gesinn-it-ilm

Description

@gesinn-it-ilm

For MW 1.40 there are 4 failing integration tests.
Looks like the parser functions are not registered correctly.

Example one of those failing tests:

1) SRF\Tests\Integration\JSONScript\JsonTestCaseScriptRunnerTest::testCaseFile with data set "bibtex-01.json" ('/var/www/html/extensions/Sema...1.json')
Failed "#0 `format=bibtex` empty (bibtex-01-0.bib)"

==== (actual) ====

==== (StringContains expected) ====
[ @Book{,
} ]

Failed asserting that 0 matches expected 1.

/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:78
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:32
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/JSONScript/SpecialPageTestCaseProcessor.php:152
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/Utils/JSONScript/SpecialPageTestCaseProcessor.php:94
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptServicesTestCaseRunner.php:395
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptServicesTestCaseRunner.php:135
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptTestCaseRunner.php:237
/var/www/html/tests/phpunit/MediaWikiIntegrationTestCase.php:521
/var/www/html/extensions/SemanticResultFormats/extensions/SemanticMediaWiki/tests/phpunit/SMWIntegrationTestCase.php:205

Steps to reproduce the failures:

  • the tests are bibtex-01.json, gallery-01.json, gallery-02.json and gallery-03.json
  • from those tests remove skip-on parts which contain mediawiki version 1.39 and 1.40 like:
"skip-on": {
      "mediawiki": [
	        ">1.40",
	        "Check parser function registration for MW 1.40+"
        ]
}
"skip-on": {
        "mediawiki": [ ">1.39.x", "Check parser function registration for MW 1.40+" ]
}
  • run the CI locally for MW 1.40 with the var set like this:
# docker images
MW_VERSION?=1.40
PHP_VERSION?=8.1
DB_TYPE?=mysql
DB_IMAGE?="mariadb:11.2"

# extensions
SMW_VERSION?=dev-master
PF_VERSION ?= 5.5.1
SFS_VERSION ?= 4.0.0-beta
MM_VERSION ?= 3.1.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions