Code Duplication    Length = 12-12 lines in 2 locations

test/unit/Container/ContainerTest.php 1 location

@@ 47-58 (lines=12) @@
44
        $cont->add('baz', 'd');
45
    }
46
47
    public function testForAll()
48
    {
49
        $params = ['foo' => 'a', 'bar' => 'b', 'baz' => 'c'];
50
        $seen = [];
51
52
        $cont = new Container($params);
53
        $cont->forAll(function ($value, $key) use (&$seen) {
54
            $seen[$key] = $value;
55
        });
56
57
        $this->assertEquals($params, $seen);
58
    }
59
60
    public function testGet()
61
    {

test/unit/Container/ImmutableContainerTest.php 1 location

@@ 46-57 (lines=12) @@
43
        $cont->add('baz', 'd');
44
    }
45
46
    public function testForAll()
47
    {
48
        $params = ['foo' => 'a', 'bar' => 'b', 'baz' => 'c'];
49
        $seen = [];
50
51
        $cont = new ImmutableContainer($params);
52
        $cont->forAll(function ($value, $key) use (&$seen) {
53
            $seen[$key] = $value;
54
        });
55
56
        $this->assertEquals($params, $seen);
57
    }
58
59
    public function testGet()
60
    {