PHPUnit now recognizes extension parser tests
authorAntoine Musso <hashar@free.fr>
Fri, 10 May 2013 19:20:12 +0000 (21:20 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 17 Jun 2013 15:21:31 +0000 (15:21 +0000)
commita9ab983b2656516b90bdea697bd35e6ae981e46c
tree3fb9c82598ac22e88b7d29b46d17777ed67feaa2
parent6a3bc6294a1b5b42a4d0f7062152d892e0aed1d3
PHPUnit now recognizes extension parser tests

Parser tests are registeredd by appending one or more .txt files to the
$wgParserTestFiles global setting.  Since this is shared with MediaWiki
core, I have made MediaWikiParserTest a factory of PHPUnit testsuite
which would filter in/out extensions tests.

The `extensions` test suite now has a second test suite builder which is
simply a wrapper around MediaWikiParserTest factory.

Play cases:

  $ php phpunit.php --group Parser --tap

Runs any parser tests including the ones coming from extensions.

With an extension having parser tests such as Cite:

  $ php phpunit.php --testsuite extensions --tap
  // Extensions tests are run including parser tests.

bug: 42506
Change-Id: Icc3e9d30706b32149aa9dd18552e4241ec4af67e
tests/TestsAutoLoader.php
tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/suite.xml
tests/phpunit/suites/ExtensionsParserTestSuite.php [new file with mode: 0644]