X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2F1ParsingBugsTest.php;h=e4a3048c08ad35bed184146b785125da24374bef;hb=568742e1a2911037c8d164716c138aa2cce74039;hp=33915cab1c0a019f7bd23b8aa3892f7b7fa4b4e4;hpb=f7815d511de0760616a58cfb3c1161242a216c9d;p=plcapi.git diff --git a/tests/1ParsingBugsTest.php b/tests/1ParsingBugsTest.php index 33915ca..e4a3048 100644 --- a/tests/1ParsingBugsTest.php +++ b/tests/1ParsingBugsTest.php @@ -413,52 +413,56 @@ and there they were.postid7414222userid311127 -dateCreated20011126T09:17:52content' . utf8_encode('������') . 'postid7414222 +dateCreated20011126T09:17:52content' . utf8_encode($string) . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); $v = $r->value(); $v = $v['content']; - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); $f = 'userid311127 -dateCreated20011126T09:17:52content' . utf8_encode('������') . 'postid7414222 +dateCreated20011126T09:17:52content' . utf8_encode($string) . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); $v = $r->value(); $v = $v['content']; - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); $r = php_xmlrpc_decode_xml($f); $v = $r->value(); $v = $v->structmem('content')->scalarval(); - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); } public function testLatin1Response() { + $string = chr(224) . chr(252) . chr(232); + $s = new xmlrpcmsg('dummy'); $f = "HTTP/1.1 200 OK\r\nContent-type: text/xml; charset=ISO-8859-1\r\n\r\n" . 'userid311127 -dateCreated20011126T09:17:52content' . '������' . 'postid7414222 +dateCreated20011126T09:17:52content' . $string . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); $v = $r->value(); $v = $v['content']; - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); $f = 'userid311127 -dateCreated20011126T09:17:52content' . '������' . 'postid7414222 +dateCreated20011126T09:17:52content' . $string . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); $v = $r->value(); $v = $v['content']; - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); $r = php_xmlrpc_decode_xml($f); $v = $r->value(); $v = $v->structmem('content')->scalarval(); - $this->assertEquals("������", $v); + $this->assertEquals($string, $v); } public function testUTF8IntString()