The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)
My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.
Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
* Get rid of a long regexp that had to be maintained and
was broken anyway, resulting in a false negative.
* Fix that false negative.
* Make the failures array a bit more readable.
Bug: T248075
Change-Id: I4e4e5d6487d23b0d64f29c113d84bddce758e516
Going directly to 8 is too much pain.
Depends-On: Iafcea151389663d79e70ad6ab3741ce8b2e25cac
Bug: T192167
Change-Id: I77ea560f4a5344bd1c356ecc3e7857968ad829b8
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
This makes StructureTest also recognize test classes which look like
use PHPUnit\Framework\TestCase;
class FooTest extends TestCase {
instead of
class FooTest extends \PHPUnit\Framework\TestCase {
This form is preferred, for instance, in Wikibase code.
Bug: T188276
Change-Id: I5bef035df33d317893ad3ba195ecb75f3b09a62f
The phpunit root directory has two test file:
AutoLoaderTest.php
StructureTest.php
The later was registered in phpunit under the `structure` test suite
while the former was not registered and hence never run (bug 47750).
This patch moves both files under the `structure` subdirectory and
change the suite to look in that directory. That will avoid us having
to manually maintain a list of test files.
Updated the __DIR__ in StructureTest.php.
Change-Id: I419c9157f32bdf7e1ff26a42f4bb3f3922b7be37
2013-05-21 12:33:42 +02:00
Renamed from tests/phpunit/StructureTest.php (Browse further)