1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 21:41:22 +02:00
Files
archived-php-src/ext/dom/tests/bug46335.phpt
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

36 lines
908 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--TEST--
Bug #46335 (DOMText::splitText doesn't handle multibyte characters).
--EXTENSIONS--
dom
--FILE--
<?php
$textascii = 'This is an "example" of using DOM splitText';
$text = 'This is an example of using DOM splitText';
$start = 30;
$length = 3;
$dom = new DOMDocument('1.0', 'UTF-8');
$node = $dom->createTextNode($textascii);
$dom->appendChild($node);
print "Text: $node->textContent\n";
$matched = $node->splitText($start);
$matched->splitText($length);
print "splitText (ASCII): $matched->textContent\n";
$node = $dom->createTextNode($text);
$dom->appendChild($node);
print "Text: $node->textContent\n";
$matched = $node->splitText($start);
$matched->splitText($length);
print "splitText (UTF-8): $matched->textContent\n";
?>
--EXPECT--
Text: This is an "example" of using DOM splitText
splitText (ASCII): DOM
Text: This is an example of using DOM splitText
splitText (UTF-8): DOM