本文整理汇总了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);
}