| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I3a9f932acb7d9cf44a984b5d97f9fbc6b8670f7d
|
|
|
|
|
|
|
| |
That mostly enables testing global functions
Bug: T87781
Change-Id: Ib42c56a67926ebcdba53f4c6c54a5bff98cb77a3
|
|
|
|
|
|
|
|
|
| |
This time, use $IP to get correct path to LocalSettings so that tests can be run
from outside MediaWiki root.
Change-Id: I0dd3dd281cff67b0d8acdc09b97328c44eca2bb6
Follows-Up: Ia36d22217f94e019bb5945705243bd0daace72e0
Bug: T226977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following discussion in Ibb8175981092d7f41864e641cc3c118af70a5c76, this patch
proposes to further reduce the scope of what unit tests may access, by removing
the loading of DefaultSettings and GlobalFunctions.php. This also has the
implied effect of disabling the storage backend, as well as the global service
locator.
MediaWikiTestCase is renamed to MediaWikiIntegrationTestCase so it's scope and
purpose is more clear. Whether we still need to keep `@group Database`
annotation around is debatable, as it's unclear to me what the performance costs
are of implying database access for all tests which extend IntegrationTestCase.
As far as I can tell, `@group Database` is primarily used in CI to run faster
tests before slower ones, and with the new UnitTestCase the annotation seems
redundant.
To run all testsuites, use `composer phpunit`. Other composer scripts:
- `composer phpunit:unit` to run unit tests
- `composer phpunit:integration` to run integration tests
- `composer phpunit:coverage` to generate code coverage reports from unit
tests (requires XDebug).
Note that you can pass arguments to composer scripts with `--`, e.g. `composer
phpunit:integration --exclude-group Dump`.
Other changes:
- Rename bootstrap.php to bootstrap.maintenance.php so it's clear it's part of
the legacy PHPUnit-as-maintenance-class setup
- Create new bootstrap.php which loads the minimal configuration necessary for
the tests, and do additional setup in the run() method of the unit/integration
test case classes
- Move the unit-tests.xml file to phpunit.xml.dist in preparation for this being
the default test configuration
For a follow-up patch:
- Find unit/integration tests for extensions/skins
- Migrate other test suites from suite.xml
- Support running all tests via vendor/bin/phpunit
Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ie717b0ecf4fcfd089d46248f14853c80b7ef4a76
|
|
|
|
|
|
|
|
| |
This reverts commit 0a2b996278e57a8b8c5377cd3a3eaa54f993d4a9.
Reason for revert: Broke postgres tests.
Change-Id: I27d8e0c807ad5f0748b9611a4f3df84cc213fbe1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset implements 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.
The initial set of tests that met these criteria were identified using the work Amir did in
I88822667693d9e00ac3d4639c87bc24e5083e5e8. These tests were then moved into a new subdirectory
under phpunit/ and organized into a separate test suite. The environment for this suite
is set up via a PHPUnit bootstrap file without a custom entry point.
You can execute these tests by running:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml
Bug: T89432
Bug: T87781
Bug: T84948
Change-Id: Iad01033a0548afd4d2a6f2c1ef6fcc9debf72c0d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@covers does not make any sense for structure tests, which either
do not cover any PHP lines (they test things like configuration or
messages), or cover lines which cannot be determined at the time
of writing the tests (e.g. they cover all classes implementing a
certain interface). Requiring @coversNothing to be manually added
for all of them is a waste of developer time.
tests/phpunit/suite.xml has forceCoversAnnotation=true so removing
the annotations will not change test coverage, these files will
still be skipped.
Change-Id: I27cb58e92341b9b1a76f109701f5bc843adbaa9b
|
|
|
|
|
| |
Bug: T182814
Change-Id: I53746333fe3c1cdc357bf46d71a351231a845e2f
|
|
|
|
|
| |
Bug: T164262
Change-Id: I9b3c54503dd9ad193af7765459613a7e73ffbb45
|
|
|
|
| |
Change-Id: I78b3315f26ab91b6b443f5b028a635552f82f5a3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update composer/semver from 1.4.2 to 1.5.0
https://github.com/composer/semver/releases/tag/1.5.0
https://github.com/composer/semver/compare/1.4.2...1.5.0
Update composer/spdx-licenses from 1.4.0 to 1.5.1
https://github.com/composer/spdx-licenses/compare/1.4.0...1.5.1
https://github.com/composer/spdx-licenses/releases/tag/1.5.1
Update mediawiki/codesniffer from 25.0.0 to 26.0.0
https://github.com/wikimedia/mediawiki-tools-codesniffer/releases/tag/v26.0.0
https://github.com/wikimedia/mediawiki-tools-codesniffer/compare/25.0.0...v26.0.0
Disable failing Squiz.WhiteSpace.FunctionSpacing, can be fixed in a later
commit
Change-Id: I89062c8f28bef893f054650f2e81287291ba9ca0
Depends-On: I8f55e77283f83d853ce340f5c1b7704c65e45bc4
|
|
|
|
| |
Change-Id: I36b26609ccb3f135a22961b32a46cdc06603b3e4
|
|
|
|
| |
Change-Id: I5c6904e32f9bc7fe3aac511c56b03757bfde15a9
|
|
|
|
|
|
| |
Bug: T160811
Change-Id: I0556c04d33386d0339e02e2bf7a1ee74d97c2abd
|
|
|
|
| |
Change-Id: Ica426312ec69707b9a99dfe2a7deee945c38ba35
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Idf9f4177fb9a523ce41227bda2af923bf418396b
|
|/
|
|
|
|
| |
Only contains one class (probably should be removed when we bump to PHP 7 fully)
Change-Id: Iab2bb837e2ed5d5556bd49f4236030b43aba29f1
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ia8a35056fa6df5b81cda3e5bfcaac91d0b898d51
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I881f1ccc4aaf8babc40ad534a2a91f1ccf3baad4
|
|\| | |
|
| | |
| | |
| | |
| | | |
Change-Id: Iccb2048eed6631caa4f20639f55866e76f9fabf0
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | | |
Change-Id: I4e3ecbf6c13a7e7cfed88253eb6820e78e49e9c3
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | | |
Change-Id: Ifc9e827202493e8f055a21875c54ff827a38d1f7
|
| |/
|/|
| |
| | |
Change-Id: If00625b700962a1c6d6412c6de30c28fa3df9f81
|
|/
|
|
| |
Change-Id: Ic8e5220f2a1832dfc39f00720001235429ed2cab
|
|
|
|
| |
Change-Id: I557bcd8369014bf2ea43c5eb8336562cb6295890
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I3eaaf23612fe1aed65e49c06a9e5e565399af9ce
|
|/
|
|
|
|
| |
Now unused, deprecated in 1.32
Change-Id: I4fc4bdf36b3832786c0266786cff57d512140d8e
|
|\
| |
| |
| | |
OneObjectStructurePerFile.MultipleFound"
|
| |
| |
| |
| | |
Change-Id: I145759b29d9e845d175cc7ac43ad72248b258df0
|
|/
|
|
| |
Change-Id: I9fc442225a37c14d0606508aed5ef496a5ad82ba
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I3fbf5d271585722e95b7966ba62dd5e16fa3623f
|
|\ \
| |/
|/|
| | |
Generic.Files.OneObjectStructurePerFile.MultipleFound"
|
| |
| |
| |
| | |
Change-Id: I9aa1eb7903dca3f63675c3be5a597829dc6d9ab3
|
|/
|
|
| |
Change-Id: Ib1a08c53f509bdae96ff8d3a5dadc9a55eb6b6af
|
|\
| |
| |
| | |
in api"
|
| |
| |
| |
| | |
Change-Id: Ibb6b324b286f62153ce5d08a66454e0b05a0ef78
|
|/
|
|
| |
Change-Id: I1f11a52871dcb249b3ba790e484dd10fe8bb049f
|
|
|
|
| |
Change-Id: I7a764fa89637dc7c3865dbbbbe0d90d5bc268ed2
|
|
|
|
| |
Change-Id: I1c676f18101250ffc28ea412213d568c5a4f527d
|
|
|
|
|
|
| |
Each class should have its own file, even it is a no-op
Change-Id: I90124ed35e354c546fcd69d52dc1febb71b2c71f
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Move all into search subfolder
Change-Id: I4097b9745d22545afe6761da1fa67cf98af5b811
|