git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70ee98a
)
2nd try at test stabilization
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 11 Jul 2015 23:45:23 +0000
(
00:45
+0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 11 Jul 2015 23:45:23 +0000
(
00:45
+0100)
tests/3LocalhostTest.php
patch
|
blob
|
history
diff --git
a/tests/3LocalhostTest.php
b/tests/3LocalhostTest.php
index
9d848ab
..
ca2e631
100644
(file)
--- a/
tests/3LocalhostTest.php
+++ b/
tests/3LocalhostTest.php
@@
-194,7
+194,7
@@
class LocalhostTest extends PHPUnit_Framework_TestCase
return;
}
$sendString = 'κόσμε'; // Greek word 'kosme'. NB: NOT a valid ISO8859 string!
return;
}
$sendString = 'κόσμε'; // Greek word 'kosme'. NB: NOT a valid ISO8859 string!
- $str = '<?xml version="1.0"?>
+ $str = '<?xml version="1.0"
encoding="_ENC_"
?>
<methodCall>
<methodName>examples.stringecho</methodName>
<params>
<methodCall>
<methodName>examples.stringecho</methodName>
<params>
@@
-204,10
+204,9
@@
class LocalhostTest extends PHPUnit_Framework_TestCase
</params>
</methodCall>';
</params>
</methodCall>';
- // these calls will have no charset declaration in either http headers or xml prolog
- $v = $this->send(mb_convert_encoding($str, 'UCS-4', 'UTF-8'));
+ $v = $this->send(mb_convert_encoding(str_replace('_ENC_', 'UCS-4', $str), 'UCS-4', 'UTF-8'));
$this->assertEquals($sendString, $v->scalarval());
$this->assertEquals($sendString, $v->scalarval());
- $v = $this->send(mb_convert_encoding(
$str
, 'UTF-16', 'UTF-8'));
+ $v = $this->send(mb_convert_encoding(
str_replace('_ENC_', 'UTF-16', $str)
, 'UTF-16', 'UTF-8'));
$this->assertEquals($sendString, $v->scalarval());
}
$this->assertEquals($sendString, $v->scalarval());
}