ttrss/tests/integration/SanitizerTest.php

21 lines
432 B
PHP
Raw Permalink Normal View History

2023-12-02 08:01:11 +00:00
<?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>')
);
}
2023-12-02 08:01:11 +00:00
}