Code Duplication    Length = 9-13 lines in 2 locations

func/array.test.php 1 location

@@ 170-178 (lines=9) @@
167
	} // end of func TestTestArrayInsert
168
169
170
    function TestArrayRead() {
171
		$ar = array('a' => 1);
172
		$x = ArrayRead($ar, 'a', '2');
173
		$this->assertEqual($x, 1);
174
		$x = ArrayRead($ar, 'b', '2');
175
		$this->assertEqual($x, 2);
176
		$x = ArrayRead($ar, 3);
177
		$this->assertEqual($x, null);
178
    } // end of func TestArrayRead
179
180
181
    function TestFilterWildcard() {

func/url.test.php 1 location

@@ 27-39 (lines=13) @@
24
25
class TestFuncUrl extends UnitTestCase {
26
27
	function TestSetUrlParam() {
28
		$url = 'http://www.domain.tld/?a=1&b=2&';
29
30
		$url1 = SetUrlParam($url, 'a', 2);
31
		$this->assertEqual($url1, 'http://www.domain.tld/?a=2&b=2');
32
33
		$url1 = SetUrlParam($url, 'b', 3);
34
		$this->assertEqual($url1, 'http://www.domain.tld/?a=1&b=3');
35
36
		$url1 = SetUrlParam($url, 'c');
37
		$this->assertEqual($url1, 'http://www.domain.tld/?a=1&b=2&c=');
38
39
	} // end of func TestSetUrlParam
40
41
    function TestUrlPlan() {
42
    	$url = 'http://www.google.com/?a=https://something';