Code Duplication    Length = 11-14 lines in 2 locations

test/units/Adapters/AbstractAdapterTest.php 2 locations

@@ 37-47 (lines=11) @@
34
                ->isEqualTo("Youpi!");
35
    }
36
37
    public function testAdd()
38
    {
39
        $this
40
            ->given($handler = function () {
41
                echo "Youpi!";
42
            })
43
            ->then
44
                ->array($this->adapter->get('name'))
45
                    ->hasSize(0)
46
            ->when($this->adapter->add('name', $handler))
47
            ->then
48
                ->array($this->adapter->get('name'))
49
                    ->hasSize(1);
50
    }
@@ 53-66 (lines=14) @@
50
    }
51
52
53
    public function testRemove()
54
    {
55
        $this
56
            ->given(
57
                $handler = function () {
58
                    echo "Youpi!";
59
                },
60
                $this->adapter->add('name', $handler)
61
            )
62
            ->then
63
                ->array($this->adapter->get('name'))
64
                    ->hasSize(1)
65
            ->when($this->adapter->remove('name', $handler))
66
            ->then
67
                ->array($this->adapter->get('name'))
68
                    ->hasSize(0);
69
    }