wiki.techinc.nl/tests/phpunit/includes/diff/CustomDifferenceEngine.php
Bill Pirkle d993f499ee Refactor calls to deprecated function Content::getNativeData()
Function Content::getNativeData() was deprecated.  Replace with
calls to new function TextContent::getText() in most places.

Bug: T155582
Change-Id: I2bd508c72aac4faf474ba45ab1f92e2e8d2eb9be
2019-02-15 17:48:01 +00:00

23 lines
476 B
PHP

<?php
class CustomDifferenceEngine extends DifferenceEngine {
public function __construct() {
parent::__construct();
}
public function generateContentDiffBody( Content $old, Content $new ) {
return $old->getText() . '|' . $new->getText();
}
public function showDiffStyle() {
$this->getOutput()->addModules( 'foo' );
}
public function getDiffBodyCacheKeyParams() {
$params = parent::getDiffBodyCacheKeyParams();
$params[] = 'foo';
return $params;
}
}