Completed
Branch release/v1.0.0 (b932d7)
by Edward
03:07 queued 40s
created

ImmutableCollectionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
c 2
b 0
f 2
lcom 0
cbo 2
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testOffsetUnset() 0 6 1
A testOffsetSet() 0 6 1
1
<?php
2
/**
3
 * File ImmutableCollectionTest.php
4
 *
5
 * @author Edward Pfremmer <[email protected]>
6
 */
7
namespace Epfremme\Tests\Collection;
8
9
use Epfremme\Collection\ImmutableCollection;
10
11
/**
12
 * Class ImmutableCollectionTest
13
 *
14
 * @package Epfremme\Tests\Collection
15
 */
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