Code Duplication    Length = 11-13 lines in 2 locations

tests/3LocalhostTest.php 2 locations

@@ 309-319 (lines=11) @@
306
        }
307
    }
308
309
    public function testAdding()
310
    {
311
        $m = new xmlrpcmsg('examples.addtwo', array(
312
            new xmlrpcval(12, 'int'),
313
            new xmlrpcval(-23, 'int'),
314
        ));
315
        $v = $this->send($m);
316
        if ($v) {
317
            $this->assertEquals(12 - 23, $v->scalarval());
318
        }
319
    }
320
321
    public function testInvalidNumber()
322
    {
@@ 321-333 (lines=13) @@
318
        }
319
    }
320
321
    public function testInvalidNumber()
322
    {
323
        $m = new xmlrpcmsg('examples.addtwo', array(
324
            new xmlrpcval('fred', 'int'),
325
            new xmlrpcval("\"; exec('ls')", 'int'),
326
        ));
327
        $v = $this->send($m);
328
        /// @todo a fault condition should be generated here
329
        /// by the server, which we pick up on
330
        if ($v) {
331
            $this->assertEquals(0, $v->scalarval());
332
        }
333
    }
334
335
    public function testBoolean()
336
    {