X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2F1ParsingBugsTest.php;h=8ed214bdaf77ff99a47efc8cd2a71c113dd9bf30;hb=19b99735570521d8172f73124ade5997b9dca75d;hp=6a6a3f99a492c33407d215c74c69e4b0fc052023;hpb=4bc0f6904a12381079bec46ad648f6170f07d449;p=plcapi.git diff --git a/tests/1ParsingBugsTest.php b/tests/1ParsingBugsTest.php index 6a6a3f9..8ed214b 100644 --- a/tests/1ParsingBugsTest.php +++ b/tests/1ParsingBugsTest.php @@ -5,6 +5,9 @@ include_once __DIR__ . '/../lib/xmlrpc.inc'; include_once __DIR__ . '/../lib/xmlrpcs.inc'; +/** + * Tests involving parsing of xml and handling of xmlrpc values + */ class ParsingBugsTests extends PHPUnit_Framework_TestCase { public $args = array(); @@ -40,8 +43,8 @@ class ParsingBugsTests extends PHPUnit_Framework_TestCase $v = new xmlrpcval('-1'); $u = new xmlrpcval('-1', 'string'); $t = new xmlrpcval(-1, 'string'); - $this->assertEquals($u->scalarval(), $v->scalarval()); - $this->assertEquals($t->scalarval(), $v->scalarval()); + $this->assertEquals($v->scalarval(), $u->scalarval()); + $this->assertEquals($v->scalarval(), $t->scalarval()); } /** @@ -49,8 +52,8 @@ class ParsingBugsTests extends PHPUnit_Framework_TestCase */ public function testMinusOneInt() { - $v = new xmlrpcval(-1); $u = new xmlrpcval(); + $v = new xmlrpcval(-1); $this->assertEquals($u->scalarval(), $v->scalarval()); } @@ -63,7 +66,7 @@ class ParsingBugsTests extends PHPUnit_Framework_TestCase $m = $this->newMsg('dummy'); $r = $m->parseResponse($r); $v = $r->value(); - $this->assertEquals($v->structmemexists($str), true); + $this->assertEquals(true, $v->structmemexists($str)); } public function testUnicodeInErrorString()