Code Duplication    Length = 11-13 lines in 2 locations

tests/3LocalhostTest.php 2 locations

@@ 321-331 (lines=11) @@
318
        }
319
    }
320
321
    public function testAdding()
322
    {
323
        $m = new xmlrpcmsg('examples.addtwo', array(
324
            new xmlrpcval(12, 'int'),
325
            new xmlrpcval(-23, 'int'),
326
        ));
327
        $v = $this->send($m);
328
        if ($v) {
329
            $this->assertEquals(12 - 23, $v->scalarval());
330
        }
331
    }
332
333
    public function testInvalidNumber()
334
    {
@@ 333-345 (lines=13) @@
330
        }
331
    }
332
333
    public function testInvalidNumber()
334
    {
335
        $m = new xmlrpcmsg('examples.addtwo', array(
336
            new xmlrpcval('fred', 'int'),
337
            new xmlrpcval("\"; exec('ls')", 'int'),
338
        ));
339
        $v = $this->send($m);
340
        /// @todo a fault condition should be generated here
341
        /// by the server, which we pick up on
342
        if ($v) {
343
            $this->assertEquals(0, $v->scalarval());
344
        }
345
    }
346
347
    public function testBoolean()
348
    {