This changeset lays down the basic groundwork required to implement
T89432 and related tickets and is based on exploration done
at the Prague Hackathon. The goal is to identify tests in MediaWiki core
that can be run without having to install & configure MediaWiki and its dependencies,
and provide a way to execute these tests via the standard phpunit entry point,
allowing for faster development and integration with existing tooling like IDEs.
This changeset creates a new subdirectory under phpunit/ and organizes it
into a separate test suite. The environment for this suite is set up
via a PHPUnit bootstrap file without a custom entry point. For B/C, this
directory is also registered in suite.xml, to ensure that existing CI jobs
still pick up tests in the new suite.
For initial testing, a single test class, PasswordFactoryTest, was moved
to this new suite.
You can run the new suite using the follwoing command:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml
Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: I69b92db3e70093570e05cc0a64c7780a278b321a
This is needed in order for Phan not to consider calls to
IDatabase::buildLike as invalid. Interestingly, it does not
consider calls to Database::buildLike invalid.
Bug: T191668
Change-Id: I0e027f5ec66d20b1d11e3441086001f6a751e1f5
The connection instance is injected unlike with the parent class,
meaning that it does not own the connection. No-op the method.
Change-Id: I61914b986619f201ac9cc8c94d46873a3b9e8177
The idea is to avoid expensive calls to makeDummyRevisionRow, and speed up
installation of MediaWiki on CI.
Bug: T225901
Change-Id: I6f69281568218c89eb18353c06cabf7eb1926de8
undefineTag() also deletes the tag if it's not used anywhere,
which is breaking the rest of deleteTagEverywhere() in that case.
Bug: T225564
Change-Id: I7ca5db9efd0088b266e33c0a9ce78d73a4fa87c9
The FileRepo extension API allows to specify factory methods that
FileRepo implementations will use to instantiate File instances.
Currently, the default static constructors in LocalFile and OldLocalFile
do not use Late Static Binding, so every subclass is forced to re-implement them,
even if they would not need any custom logic. Switching to Late Static Binding
(available since PHP 5.3) allows File implementors to reduce boilerplate
if they do not need to overwrite the existing logic.
Change-Id: Id8f6f5362b68269c2a3232796a1703be14116dd5
Changes in the behavior:
* The expanding/collapsing now works even with disabled JavaScript.
* There is no FOUC on loading anymore.
* The animation on show/hide is absent.
Change-Id: I1b88d8e2cdbb1c969670a7a8637dba10bf447330
Bring HTMLSelectAndOtherField in line with other HTMLFormFields by
ensuring that the default value is of the correct type and passes
validation checks.
Also make sure HTMLSelectAndOtherField::validate checks for the
final value, if the field has required set to true.
Bug: T222170
Bug: T225860
Change-Id: I949ee3df2b1f597982cf522b149c54b8e79d59bc