Commit graph

3 commits

Author SHA1 Message Date
Derick Alangi
f88eab53a6 tests: Use overrideConfig(Value|Values) where needed
This continues the work in the child patch to replace callers
of setMwGlobals() with the appropriate method. Directory this
patch covers is `tests/phpunit/integration/`.

Change-Id: I0a9abf0d2a43587f2ffa029b68024a1ba5165fc7
2022-07-12 14:40:46 +01:00
Tim Starling
6ccfe5d5c9 Fix PHP 8.0 failure of WikiExporterFactoryTest
In PHP 7, "some unlikely string 2" was a valid value for the $text
parameter to XmlDumpWriter::__construct(), because non-strict comparison
was used, so "some unlikely string 2" was coerced to integer 0 which is
equal to WRITE_CONTENT. In PHP 8.0, non-strict comparison has changed such
that "some unlikely string 2" != 0.

Pass strict=true to in_array() so that the test fails on both versions.
Please review for potential production impact.

Fix the test so that it passes after this change.

Bug: T283275
Change-Id: I5a84fb70db9d02ea10f87299eb41f80ba8fc787c
2022-01-21 15:20:57 +11:00
Alexander Vorwerk
2fbf13812a WikiExporter: inject services
This patch injects services into WikiExporter. It also adds a
WikiExporterFactory service for creating WikiExporter instances.

Change-Id: Ib1547defea54c309865c116bc83d617c21568843
2021-09-06 10:03:37 +00:00