File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ public function testFlattenWithDepth()
146146
147147 public function testGet ()
148148 {
149+ $ array = ['products.desk ' => ['price ' => 100 ]];
150+ $ this ->assertEquals (['price ' => 100 ], Arr::get ($ array , 'products.desk ' ));
151+
149152 $ array = ['products ' => ['desk ' => ['price ' => 100 ]]];
150153 $ value = Arr::get ($ array , 'products.desk ' );
151154 $ this ->assertEquals (['price ' => 100 ], $ value );
@@ -210,6 +213,11 @@ public function testGet()
210213
211214 public function testHas ()
212215 {
216+ $ array = ['products.desk ' => ['price ' => 100 ]];
217+ $ this ->assertTrue (Arr::has ($ array , 'products.desk ' ));
218+ $ this ->assertTrue (Arr::has ($ array , ['products.desk ' ]));
219+ $ this ->assertFalse (Arr::has ($ array , ['products.desk ' , 'missing ' ]));
220+
213221 $ array = ['products ' => ['desk ' => ['price ' => 100 ]]];
214222 $ this ->assertTrue (Arr::has ($ array , 'products.desk ' ));
215223 $ this ->assertTrue (Arr::has ($ array , 'products.desk.price ' ));
You can’t perform that action at this time.
0 commit comments