Code Duplication    Length = 17-19 lines in 2 locations

Tests/Units/DynamicDispatchVisitorInterfaceTestCase.php 1 location

@@ 43-59 (lines=17) @@
40
     *
41
     * @dataProvider visitDataProvider
42
     */
43
    public function testVisit(
44
        DynamicDispatchVisitorInterface $visitor,
45
        VisiteeInterface $visitee,
46
        $visitorMethod,
47
        $expected
48
    ) {
49
        $this
50
            ->given($visitor, $visitee)
51
            ->when($result = $visitor->visit($visitee))
52
            ->then()
53
                ->mock($visitor)
54
                    ->call($visitorMethod)
55
                        ->withArguments($visitee)
56
                            ->once()
57
                ->variable($result)
58
                    ->isEqualTo($expected);
59
    }
60
61
    /**
62
     * Test canHandlerVisitee method.

Tests/Units/LinkedVisitorTestCase.php 1 location

@@ 33-51 (lines=19) @@
30
     *
31
     * @dataProvider visitNextDataProvider
32
     */
33
    public function testVisitNext(
34
        LinkedVisitor $visitor,
35
        LinkedVisitor $next,
36
        VisiteeInterface $visitee,
37
        $visitorMethod,
38
        $expected
39
    ) {
40
        $this
41
            ->given($visitor, $visitee)
42
            ->when($result = $visitor->visit($visitee))
43
            ->then()
44
                ->mock($next)
45
                    ->call($visitorMethod)
46
                        ->withArguments($visitee)
47
                            ->once()
48
                ->variable($result)
49
                    ->isEqualTo($expected)
50
        ;
51
    }
52
53
    /**
54
     * @return array