Code Duplication    Length = 22-22 lines in 2 locations

htdocs/class/libraries/vendor/webmozart/assert/tests/AssertTest.php 2 locations

@@ 371-392 (lines=22) @@
368
    /**
369
     * @dataProvider getTests
370
     */
371
    public function testAllArray($method, $args, $success, $multibyte = false, $minVersion = null)
372
    {
373
        if ($minVersion && PHP_VERSION_ID < $minVersion) {
374
            $this->markTestSkipped(sprintf('This test requires php %s or upper.', $minVersion));
375
376
            return;
377
        }
378
        if ($multibyte && !function_exists('mb_strlen')) {
379
            $this->markTestSkipped('The function mb_strlen() is not available');
380
381
            return;
382
        }
383
384
        if (!$success) {
385
            $this->setExpectedException('\InvalidArgumentException');
386
        }
387
388
        $arg = array_shift($args);
389
        array_unshift($args, array($arg));
390
391
        call_user_func_array(array('Webmozart\Assert\Assert', 'all'.ucfirst($method)), $args);
392
    }
393
394
    /**
395
     * @dataProvider getTests
@@ 397-418 (lines=22) @@
394
    /**
395
     * @dataProvider getTests
396
     */
397
    public function testAllTraversable($method, $args, $success, $multibyte = false, $minVersion = null)
398
    {
399
        if ($minVersion && PHP_VERSION_ID < $minVersion) {
400
            $this->markTestSkipped(sprintf('This test requires php %s or upper.', $minVersion));
401
402
            return;
403
        }
404
        if ($multibyte && !function_exists('mb_strlen')) {
405
            $this->markTestSkipped('The function mb_strlen() is not available');
406
407
            return;
408
        }
409
410
        if (!$success) {
411
            $this->setExpectedException('\InvalidArgumentException');
412
        }
413
414
        $arg = array_shift($args);
415
        array_unshift($args, new ArrayIterator(array($arg)));
416
417
        call_user_func_array(array('Webmozart\Assert\Assert', 'all'.ucfirst($method)), $args);
418
    }
419
420
    public function getStringConversions()
421
    {