| 1 | <?php |
||
| 16 | class ImmutableCollectionTest extends \PHPUnit_Framework_TestCase |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Test invalid offset seek exception |
||
| 20 | * |
||
| 21 | * @expectedException \Epfremme\Exception\ImmutableException |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function testOffsetUnset() |
||
| 25 | { |
||
| 26 | $collection = new ImmutableCollection([1,2,3]); |
||
| 27 | |||
| 28 | $collection->offsetUnset(0); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Test immutable collection exception |
||
| 33 | * |
||
| 34 | * @expectedException \Epfremme\Exception\ImmutableException |
||
| 35 | * @return void |
||
| 36 | */ |
||
| 37 | public function testOffsetSet() |
||
| 38 | { |
||
| 39 | $collection = new ImmutableCollection([1,2,3]); |
||
| 40 | |||
| 41 | $collection->offsetSet(0, 7); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |