Fix test on alpine/musl (#15072)

When libxml uses musl iconv, GBK encoding is not supported as a target encoding
This commit is contained in:
Arnaud Le Blanc 2024-07-23 16:07:26 +02:00 committed by GitHub
parent 00e45887fa
commit e63f822e6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 18 deletions

View file

@ -1,18 +0,0 @@
--TEST--
XMLWriter::toStream() with encoding - test GBK
--EXTENSIONS--
xmlwriter
--FILE--
<?php
$h = fopen("php://output", "w");
$writer = XMLWriter::toStream($h);
$writer->startDocument(encoding: "GBK");
$writer->writeComment("\u{00E9}\u{00E9}\u{00E9}");
unset($writer);
?>
--EXPECT--
<?xml version="1.0" encoding="GBK"?>
<!--¨¦¨¦¨¦-->

View file

@ -0,0 +1,18 @@
--TEST--
XMLWriter::toStream() with encoding - test SHIFT_JIS
--EXTENSIONS--
xmlwriter
--FILE--
<?php
$h = fopen("php://output", "w");
$writer = XMLWriter::toStream($h);
$writer->startDocument(encoding: "SHIFT_JIS");
$writer->writeComment("\u{3041}\u{3041}\u{3041}");
unset($writer);
?>
--EXPECT--
<?xml version="1.0" encoding="SHIFT_JIS"?>
<!--‚Ÿ‚Ÿ‚Ÿ-->