Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class ArrayGetTest extends TestCase |
||
8 | { |
||
9 | public function testWillReturnDefaultIfNotAvailable() |
||
16 | } |
||
17 | |||
18 | public function testWillReturnNullIfNoDefaultSpecified() |
||
19 | { |
||
20 | $data = []; |
||
21 | $key = 'foo'; |
||
22 | $result = Arr::get($data, $key); |
||
23 | $this->assertNull($result); |
||
24 | } |
||
25 | |||
26 | public function testWillReturnValueForKey() |
||
27 | { |
||
28 | $data = [ |
||
29 | 'foo' => 'fighters', |
||
30 | 'bar' => 'tenders', |
||
31 | ]; |
||
32 | $key = 'foo'; |
||
33 | $result = Arr::get($data, $key); |
||
34 | $this->assertEquals('fighters', $result); |
||
35 | } |
||
36 | |||
37 | public function testWillFindUsingDotNotation() |
||
51 | } |
||
52 | } |
||
53 |