Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testGetReturnsItemIfItExists() |
||
21 | { |
||
22 | $exp = $this->fixtures['assoc']; |
||
23 | $coll = Factory::create($exp); |
||
24 | $this->assertEquals('second', $coll->get('2nd')); |
||
25 | $coll->remove('2nd'); |
||
26 | $this->assertNull($coll->get('2nd')); |
||
27 | $this->assertEquals( |
||
28 | 'default', |
||
29 | $coll->get('2nd', 'default'), |
||
30 | 'If a default is provided, Collection::get() should return it if no item is found.' |
||
31 | ); |
||
32 | } |
||
33 | } |
||
34 |