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
42 lines
1.3 KiB
XML
42 lines
1.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<phpunit bootstrap="unit/initUnitTests.php"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
|
|
|
colors="true"
|
|
backupGlobals="false"
|
|
convertErrorsToExceptions="true"
|
|
convertNoticesToExceptions="true"
|
|
convertWarningsToExceptions="true"
|
|
forceCoversAnnotation="true"
|
|
stopOnFailure="false"
|
|
timeoutForSmallTests="10"
|
|
timeoutForMediumTests="30"
|
|
timeoutForLargeTests="60"
|
|
beStrictAboutTestsThatDoNotTestAnything="true"
|
|
beStrictAboutOutputDuringTests="true"
|
|
beStrictAboutTestSize="true"
|
|
verbose="false">
|
|
<testsuites>
|
|
<testsuite name="tests">
|
|
<directory>unit</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
<groups>
|
|
<exclude>
|
|
<group>Broken</group>
|
|
</exclude>
|
|
</groups>
|
|
<filter>
|
|
<whitelist addUncoveredFilesFromWhitelist="true">
|
|
<directory suffix=".php">../../includes</directory>
|
|
<directory suffix=".php">../../languages</directory>
|
|
<directory suffix=".php">../../maintenance</directory>
|
|
<exclude>
|
|
<directory suffix=".php">../../languages/messages</directory>
|
|
<file>../../languages/data/normalize-ar.php</file>
|
|
<file>../../languages/data/normalize-ml.php</file>
|
|
</exclude>
|
|
</whitelist>
|
|
</filter>
|
|
</phpunit>
|