Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Commit 7fea677

Browse files
committed
Array unit test coveage
1 parent 88c8f1d commit 7fea677

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

CodeIgniter4/Tests/Arrays/ArrayDeclarationUnitTest.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,16 @@ class MyClass {
8181
'escape' => $escape,
8282
];
8383
}
84+
85+
public $arr = array( );
86+
87+
public $arr = [ ];
88+
89+
public $arr = [1,];
90+
91+
public $arr = [
92+
'a'=> 1,
93+
'b'=> 2,
94+
'b' => 2,
95+
];
8496
}

CodeIgniter4/Tests/Arrays/ArrayDeclarationUnitTest.inc.fixed

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,16 @@ class MyClass {
148148
'escape' => $escape,
149149
];
150150
}
151+
152+
public $arr = array();
153+
154+
public $arr = [];
155+
156+
public $arr = [1];
157+
158+
public $arr = [
159+
'a' => 1,
160+
'b' => 2,
161+
'b' => 2,
162+
];
151163
}

CodeIgniter4/Tests/Arrays/ArrayDeclarationUnitTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ public function getErrorList()
7777
80 => 1,
7878
81 => 1,
7979
82 => 1,
80+
85 => 1,
81+
87 => 1,
82+
89 => 1,
83+
92 => 1,
84+
93 => 1,
8085
);
8186

8287
}//end getErrorList()

0 commit comments

Comments
 (0)