`$this->createMock( User::class )` will return a mock User object
with all fields defaulting to null and this will fail when the
`onGetPreferences()` hook fires in CA since that gets consumed by
`getFormDescriptor()` in PreferencesFactory.
This patch changes the mock user object to a test user object and
this is fine because it's already an integration test.
Bug: T357854
Change-Id: I3d80fc1e59ff00a1a08def41c53d82bc093b6e00
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I8fad94b215664fb77acf8cd8140232271d2c2837
* PNG images are no longer displayed as of
I595926027433182cc0396570bc3f1ce0cd2cafb3
* Remove functional dead code about PNG images
* Replace some type hints with type delcarations
Bug: T311620
Change-Id: I283c23e327ef908cfb4c827599fdcdb16252b08c
It needs a database connection to create the user, which is unnecessary
here.
Depends-On: I80723b886b2b5a5d75cbb73571e1b19ea4a09af5
Change-Id: I260b8ca433733b7754616e6e24778935597981a5
Removes functionality to
* select PNG rendering mode
* automated fallback to PNG images for SVG rendering
* PNG mode related class and tests
However, PNG images received from mathoid / restbase are still stored.
Bug: T311620
Change-Id: I595926027433182cc0396570bc3f1ce0cd2cafb3
* add some basic tests
* migrate MathWikibaseConnectorTest to a unit test
Bug: T313331
Depends-On: Ic3b8d4f685d5cf648a02696284b6ee499502a12a
Change-Id: I38d6425eb5e2c52ae4362c4b8656223a8d9d90a5
* add some basic tests
* MathWikibaseConfig should also be transformed into a service in a follow
up to allow for better testing
Bug: T313331
Change-Id: Iec7446a06d9a117cdeba9d26616f4fdf8e8540ca
Instead of modifying a page rendering hash,
use the proper mechanism of parser option
registration. The cache is still split on parser
option value. The 'math' option is lazy, since
not all pages contain 'math' tag and we want to
avoid an user preference lookup for every parse.
WARNING: this will invalidate ParserCache for
all pages that contain <math> tags, but according
to Moritz, this is about 1% of all pages, so we
should be fine.
Setting up the test is still rather hard and weird
due to very hacky rendering mode to user option
converter, and math renderer interaction with the DB.
This will be cleaned up later.
Depends-On: I92b3e18fabef4eecac2ec2a4844f1be2716e5d89
Change-Id: I3bce04684070ad306685dabbc51267def25773cd