Debian Codegraph @

tests/phpunit/includes/languages/LanguageZhTest.php

raw symbols SCIP
1 <?php
2
3 use MediaWiki\MainConfigNames;
4
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
18 );
19 }
20 }