Code Duplication    Length = 21-21 lines in 2 locations

tests/phpunit/tests/functions.php 2 locations

@@ 70-90 (lines=21) @@
67
        $this->assertFalse(bool_from_yn('n'));
68
    }
69
70
    function test_path_is_absolute() 
71
    {
72
        if (!is_callable('path_is_absolute') ) {
73
              $this->markTestSkipped();
74
        }
75
76
        $absolute_paths = array(
77
         '/',
78
         '/foo/',
79
         '/foo',
80
         '/FOO/bar',
81
         '/foo/bar/',
82
         '/foo/../bar/',
83
         '\\WINDOWS',
84
         'C:\\',
85
         'C:\\WINDOWS',
86
         '\\\\sambashare\\foo',
87
         );
88
        foreach ($absolute_paths as $path) {
89
                 $this->assertTrue(path_is_absolute($path), "path_is_absolute('$path') should return true");
90
        }
91
    }
92
93
    function test_path_is_not_absolute() 
@@ 93-113 (lines=21) @@
90
        }
91
    }
92
93
    function test_path_is_not_absolute() 
94
    {
95
        if (!is_callable('path_is_absolute') ) {
96
              $this->markTestSkipped();
97
        }
98
99
        $relative_paths = array(
100
         '',
101
         '.',
102
         '..',
103
         '../foo',
104
         '../',
105
         '../foo.bar',
106
         'foo/bar',
107
         'foo',
108
         'FOO',
109
         '..\\WINDOWS',
110
         );
111
        foreach ($relative_paths as $path) {
112
                 $this->assertFalse(path_is_absolute($path), "path_is_absolute('$path') should return false");
113
        }
114
    }
115
116
    /**