Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/EmailNotifications/vendor/html2text/html2text/test/HtmlCharsTest.php
Ðазад
<?php namespace Html2Text; use PHPUnit\Framework\TestCase; class HtmlCharsTest extends TestCase { public function testLaquoAndRaquo() { $html = 'This library name is «Html2Text»'; $expected = 'This library name is «Html2Text»'; $html2text = new Html2Text($html); $this->assertEquals($expected, $html2text->getText()); } public function provideSymbols() { // A variety of symbols that either used to have special handling // or still does. return array( // Non-breaking space, not a regular one. array(' ', ' '), array('>', '>'), array('<', '<'), array('©', '©'), array('©', '©'), array('™', '™'), // The TM symbol in Windows-1252, invalid in HTML... array('™', '™'), // Correct TM symbol numeric code array('™', '™'), array('®', '®'), array('®', '®'), array('—', '—'), // The m-dash in Windows-1252, invalid in HTML... array('—', '—'), // Correct m-dash numeric code array('—', '—'), array('•', '•'), array('£', '£'), array('£', '£'), array('€', '€'), array('&', '&'), ); } /** * @dataProvider provideSymbols */ public function testSymbol($entity, $symbol) { $html = "$entity signs should be UTF-8 symbols"; $expected = "$symbol signs should be UTF-8 symbols"; $html2text = new Html2Text($html); $this->assertEquals($expected, $html2text->getText()); } public function testSingleQuote() { $html = "Single quote's preservation"; $expected = "Single quote's preservation"; $html2text = new Html2Text($html); $this->assertEquals($expected, $html2text->getText()); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка