summaryrefslogtreecommitdiff
path: root/tests/integration/SanitizerTest.php
blob: 421d046af44e24b349d5d387f4d6950846bce6b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
use PHPUnit\Framework\TestCase;

/** @group integration */
final class SanitizerTest extends TestCase {
	public function test_sanitize_non_ascii(): void {
		$this->assertEquals(
			'<p>&#20013;&#25991;</p>',
			Sanitizer::sanitize('<p>中文</p>')
		);
	}

	public function test_sanitize_keep_figure(): void {
		$this->assertEquals(
			'<figure>Content</figure>',
			Sanitizer::sanitize('<figure>Content</figure>')
		);
	}
}