tests: speed up fetchTextTest
authorAntoine Musso <hashar@free.fr>
Tue, 3 Jan 2017 14:39:27 +0000 (15:39 +0100)
committerAntoine Musso <hashar@free.fr>
Tue, 3 Jan 2017 14:39:27 +0000 (15:39 +0100)
commitccecd52b8436560eeb7db98916aff2c5f229fb83
tree28c1462fcd95638102b4d3c87f157fe612925719
parentdaba6753d1f9b0b147c710e894eaf0dc397ac9c9
tests: speed up fetchTextTest

The test is adding/resetting database data on every tests, however it is
not necessary.

Switch from addDBData to addDBDataOnce.
Drop the tablesUsed[] additions, they are not needed and trigger a
resetDB().
Change the textId### variables tracking created revisions to static
variables so they are kept between tests.

On my setup the test run time goes down from 1.7 sec to 0.5 sec.

Change-Id: Ibd3183b7fbf7dcf2c0c6d1268e1b94b11919cbf3
tests/phpunit/maintenance/fetchTextTest.php