Rename JsonUnserial… to JsonDeserial…
[mediawiki.git] / tests / phpunit / includes / languages / LanguageZhTest.php
blobd97bacf608c3372049533dff4d0f3ec2b727cd4b
1 <?php
3 use MediaWiki\MainConfigNames;
5 /**
6 * @covers \LanguageZh
7 */
8 class LanguageZhTest extends LanguageClassesTestCase {
9 public function testSegmentForDiff() {
10 $this->overrideConfigValue( MainConfigNames::DiffEngine, 'php' );
11 $lhs = '维基';
12 $rhs = '维基百科';
13 $diff = TextSlotDiffRenderer::diff( $lhs, $rhs, [ 'contentLanguage' => 'zh' ] );
14 // Check that only the second part is highlighted, and word segmentation markers are not present
15 $this->assertStringContainsString(
16 '<div>维基<ins class="diffchange diffchange-inline">百科</ins></div>',
17 $diff