Test data providers should never access the database.

Any database access in test providers is hitting the live
database, not the test mock!

Change-Id: I01d8c41ed30cfaf68642c218090147ac39757c5e
This commit is contained in:
daniel 2018-08-31 16:03:14 +02:00 committed by Krinkle
parent df9b9e14a9
commit c06ca6d111

View file

@ -1508,9 +1508,13 @@ TEXT
];
}
public static function getExemplarTimestamp() {
$title = Title::newMainPage();
$user = User::newFromName( 'Test' );
public function getExemplarTimestamp() {
$title = $this->getMockBuilder( Title::class )
->getMock();
$user = $this->getMockBuilder( User::class )
->getMock();
$options = new ParserOptions;
global $wgParser;