From: gggeek Date: Tue, 17 Jan 2023 12:26:03 +0000 (+0000) Subject: fix tests for old php X-Git-Tag: 4.10.0~147 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e2ee8e801f5d3a0ba4c0b24f6a9d2b58f7239f1c;p=plcapi.git fix tests for old php --- diff --git a/tests/3EncoderTest.php b/tests/3EncoderTest.php index d1d449f2..9dd44a27 100644 --- a/tests/3EncoderTest.php +++ b/tests/3EncoderTest.php @@ -100,8 +100,10 @@ class EncoderTests extends PhpXmlRpc_PolyfillTestCase $a = $e->decodeXml(''); $this->assertEquals($string, $a->scalarVal()); - $i = $e->decodeXml('' . $string . ''); - $this->assertEquals($string, $i->scalarVal()); + if (in_array('ISO-8859-15', mb_list_encodings())) { + $i = $e->decodeXml('' . $string . ''); + $this->assertEquals($string, $i->scalarVal()); + } $u = $e->decodeXml('€'); $this->assertEquals($string, $u->scalarVal());