parserTests.php: fix three bitrot bugs with --record
authorTim Starling <tstarling@wikimedia.org>
Thu, 7 Apr 2016 05:20:38 +0000 (15:20 +1000)
committerTim Starling <tstarling@wikimedia.org>
Fri, 8 Apr 2016 02:20:50 +0000 (12:20 +1000)
commit09ff912ddd3c8b153cdd49082bfc8eabb3b522e5
tree29f970a2b9a456e11f4c8ca252d912a62b55562c
parent0e910a1907ba281afd34831a966945f9a39bfe12
parserTests.php: fix three bitrot bugs with --record

* Add a subtest index to the recorded test name, to avoid an SQL
  duplicate key error.
* Introduce TestFileDataProvider. Previously, the order of named
  parameters in TestFileIterator was relevant but undocumented, so
  adding a subtest parameter broke phpunit tests.
* Don't implicitly commit (commitMasterChanges) an explicit transaction,
  since that now causes a fatal error.
* Reset namespace cache as in NewParserTest.php, so that the MemoryAlpha
  article insertion doesn't fail. This was only visible with --record
  because the namespace cache is initialised by
  SpecialVersion::getVersion() during recorder setup.

Change-Id: Ied4636b4acbf1d268e45901fed4d4e077b5ed666
tests/TestsAutoLoader.php
tests/parser/parserTest.inc
tests/phpunit/includes/parser/NewParserTest.php
tests/testHelpers.inc