This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracted multibyte tests to their own file
- Loading branch information
1 parent
3c5df7f
commit 40d1a8a
Showing
2 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php namespace Ssddanbrown\HtmlDiff\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Ssddanbrown\HtmlDiff\Diff; | ||
|
||
class MultiByteTest extends TestCase | ||
{ | ||
public function test_chinese_content_support() | ||
{ | ||
$output = Diff::excecute('这个是中文内容, PHP is the bast', '这是中国语内容,PHP is the best language.'); | ||
$this->assertEquals('这<del class="diffdel">个</del>是中<del class="diffmod">文</del><ins class="diffmod">国语</ins>内容<del class="diffmod">, </del><ins class="diffmod">,</ins>PHP is the <del class="diffmod">bast</del><ins class="diffmod">best language.</ins>', $output); | ||
} | ||
|
||
public function test_space_changes_around_multibyte_characters() | ||
{ | ||
$output = Diff::excecute('test測試', 'test 測試'); | ||
$this->assertEquals('<del class="diffmod">test測</del><ins class="diffmod">test 測</ins>試', $output); | ||
} | ||
} |