本文整理匯總了PHP中ContentHandler::merge3方法的典型用法代碼示例。如果您正苦於以下問題:PHP ContentHandler::merge3方法的具體用法?PHP ContentHandler::merge3怎麽用?PHP ContentHandler::merge3使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ContentHandler
的用法示例。
在下文中一共展示了ContentHandler::merge3方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testMerge3
/**
* @dataProvider dataMerge3
*/
public function testMerge3($old, $mine, $yours, $expected)
{
$this->checkHasDiff3();
// test merge
$oldContent = new WikitextContent($old);
$myContent = new WikitextContent($mine);
$yourContent = new WikitextContent($yours);
$merged = $this->handler->merge3($oldContent, $myContent, $yourContent);
$this->assertEquals($expected, $merged ? $merged->getNativeData() : $merged);
}
示例2: testMerge3
/**
* @dataProvider dataMerge3
*/
public function testMerge3($old, $mine, $yours, $expected)
{
global $wgDiff3;
if (!$wgDiff3) {
$this->markTestSkipped("Can't test merge3(), since \$wgDiff3 is not configured");
}
if (!file_exists($wgDiff3)) {
#XXX: this sucks, since it uses arcane internal knowledge about TextContentHandler::merge3 and wfMerge.
$this->markTestSkipped("Can't test merge3(), since \$wgDiff3 is misconfigured: can't find {$wgDiff3}");
}
// test merge
$oldContent = new WikitextContent($old);
$myContent = new WikitextContent($mine);
$yourContent = new WikitextContent($yours);
$merged = $this->handler->merge3($oldContent, $myContent, $yourContent);
$this->assertEquals($expected, $merged ? $merged->getNativeData() : $merged);
}