PRS-2 formatting: else and braces
[plcapi.git] / tests / 3LocalhostTest.php
index 0dce568..99bb490 100644 (file)
@@ -107,8 +107,7 @@ class LocalhostTest extends PHPUnit_Framework_TestCase
         }
         if (is_array($errrorcode)) {
             $this->assertContains($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
-        }
-        else {
+        } else {
             $this->assertEquals($r->faultCode(), $errrorcode, 'Error ' . $r->faultCode() . ' connecting to server: ' . $r->faultString());
         }
         if (!$r->faultCode()) {
@@ -150,6 +149,19 @@ class LocalhostTest extends PHPUnit_Framework_TestCase
         }
     }
 
+    public function testLatin1String()
+    {
+        $sendstring =
+            "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne, and an xml comment closing tag: -->";
+        $f = '<?xml version="1.0" encoding="iso-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'.
+            $sendstring.
+            '</value></param></params></methodCall>';
+        $v = $this->send($f);
+        if ($v) {
+            $this->assertEquals($sendstring, $v->scalarval());
+        }
+    }
+
     public function testAddingDoubles()
     {
         // note that rounding errors mean we