HomePhabricator

Start converting Cirrus PHP test to MediaWikiUnitTestCase

Description

Start converting Cirrus PHP test to MediaWikiUnitTestCase

  • introduced few interfaces to be able to mock core features that depend on the DB/MWServices/Globals:
    • Parser\Sanitizer -> TitleTrait
    • SearchEngine::parseNamespacePrefix -> NamespacePrefixParser
    • SearchConfig dependency on MWServices for the ProfileService -> SearchProfileServiceFactoryFactory

Split CirrusTestCase into:

  • CirrusTestCase for MediaWikiUnitTestCase
  • CirrusIntegCase for MediaWikiIntegrationTestCase

The tests that actually required the integration env were moved
to a new NameOfTheTestIntegrationTest.php suite, e.g. UtilIntegrationTest

Tests not renamed that still sit in tests/phpunit are the ones that
remain to be ported over MediaWikiUnitTestCase.

This attempts to remove most of the pain points so that converting other
unit tests will be easier.

Bug: T232589
Change-Id: Ic904cddca7e3ce4cfb18de8a64425c0d01bf58b5

Details

Provenance
dcausseAuthored on Sep 6 2019, 4:59 PM
Parents
rECIRd6a7dcf1344d: Add CirrusSearchResultBuilder and ArrayCirrusSearchResult
Branches
Unknown
Tags
Unknown
ChangeId
Ic904cddca7e3ce4cfb18de8a64425c0d01bf58b5