aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/diff/CustomDifferenceEngine.php
blob: 29834d4f1f629bf7e8006e1256d2d5742622c467 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

use MediaWiki\Content\Content;

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;
	}

}