Code Duplication    Length = 18-18 lines in 2 locations

tests/EventTest.php 2 locations

@@ 26-43 (lines=18) @@
23
        $this->event = new Event($this->emitter);
24
    }
25
26
    public function testAcknowledge()
27
    {
28
        $message = new Message(
29
            'queue',
30
            'handler',
31
            ['foo' => 'bar']
32
        );
33
34
        $this->emitter
35
            ->expects($this->exactly(2))
36
            ->method('emit')
37
            ->withConsecutive(
38
                [Event::MESSAGE_ACKNOWLEDGE, $message],
39
                [sprintf('%s.%s', Event::MESSAGE_ACKNOWLEDGE, $message->handler()), $message]
40
            );
41
42
        $this->event->acknowledge($message);
43
    }
44
45
    public function testFinish()
46
    {
@@ 45-62 (lines=18) @@
42
        $this->event->acknowledge($message);
43
    }
44
45
    public function testFinish()
46
    {
47
        $message = new Message(
48
            'queue',
49
            'handler',
50
            ['foo' => 'bar']
51
        );
52
53
        $this->emitter
54
            ->expects($this->exactly(2))
55
            ->method('emit')
56
            ->withConsecutive(
57
                [Event::MESSAGE_FINISH, $message],
58
                [sprintf('%s.%s', Event::MESSAGE_FINISH, $message->handler()), $message]
59
            );
60
61
        $this->event->finish($message);
62
    }
63
64
    public function testReject()
65
    {