Exemplo n.º 1
0
 /**
  * @dataProvider provideIsValidMerge
  * @covers MergeHistory::isValidMerge
  * @param $source string Source page
  * @param $dest string Destination page
  * @param $timestamp string|bool Timestamp up to which revisions are merged (or false for all)
  * @param $error string|bool Expected error for test (or true for no error)
  */
 public function testIsValidMerge($source, $dest, $timestamp, $error)
 {
     $this->setMwGlobals('wgContentHandlerUseDB', false);
     $mh = new MergeHistory(Title::newFromText($source), Title::newFromText($dest), $timestamp);
     $status = $mh->isValidMerge();
     if ($error === true) {
         $this->assertTrue($status->isGood());
     } else {
         $this->assertTrue($status->hasMessage($error));
     }
 }