Code Duplication    Length = 20-20 lines in 2 locations

test/unit/Domain/ValueObject/BasketTest.php 2 locations

@@ 46-65 (lines=20) @@
43
        $this->assertTrue($expected->equals($sut->getTotal()), 'Total didn\'t match expected total');
44
    }
45
46
    public function provideGetTotalNoDiscount()
47
    {
48
        $stdReservation = new TicketReservation($this->config->getTicketType('std'), 'abc');
49
        $earlyReservation = new TicketReservation($this->config->getTicketType('early'), 'abc');
50
51
        return [
52
            [
53
                [$stdReservation],
54
                Price::fromNetCost(new Money(10000, $this->config->getCurrency()), $this->config->getTaxRate())
55
            ],
56
            [
57
                [$stdReservation, $stdReservation],
58
                Price::fromNetCost(new Money(20000, $this->config->getCurrency()), $this->config->getTaxRate())
59
            ],
60
            [
61
                [$stdReservation, $earlyReservation],
62
                Price::fromNetCost(new Money(15000, $this->config->getCurrency()), $this->config->getTaxRate())
63
            ]
64
        ];
65
    }
66
67
    /**
68
     * @dataProvider provideGetTotalWithDiscount
@@ 82-101 (lines=20) @@
79
        $this->assertTrue($expected->equals($sut->getTotal()), 'Total didn\'t match expected total');
80
    }
81
82
    public function provideGetTotalWithDiscount()
83
    {
84
        $stdReservation = new TicketReservation($this->config->getTicketType('std'), 'abc');
85
        $earlyReservation = new TicketReservation($this->config->getTicketType('early'), 'abc');
86
87
        return [
88
            [
89
                [$stdReservation],
90
                Price::fromNetCost(new Money(5000, $this->config->getCurrency()), $this->config->getTaxRate())
91
            ],
92
            [
93
                [$stdReservation, $stdReservation],
94
                Price::fromNetCost(new Money(10000, $this->config->getCurrency()), $this->config->getTaxRate())
95
            ],
96
            [
97
                [$stdReservation, $earlyReservation],
98
                Price::fromNetCost(new Money(7500, $this->config->getCurrency()), $this->config->getTaxRate())
99
            ]
100
        ];
101
    }
102
103
    /**
104
     * @dataProvider provideContainingOnly