Code Duplication    Length = 10-10 lines in 3 locations

test/unit/Domain/ReadModel/TicketCounts/TicketCounterTest.php 3 locations

@@ 20-29 (lines=10) @@
17
18
class TicketCounterTest extends TestCase
19
{
20
    public function testCreate()
21
    {
22
        $price = Price::fromNetCost(new Money(100, 'GBP'), new TaxRate(20));
23
        $ticketType = new TicketType('test', $price, 'Test ticket');
24
25
        $sut = new TicketCounter($ticketType, 10);
26
27
        self::assertEquals($ticketType, $sut->getTicketType());
28
        self::assertEquals(10, $sut->getRemaining());
29
    }
30
31
    public function testTicketsReserved()
32
    {
@@ 31-40 (lines=10) @@
28
        self::assertEquals(10, $sut->getRemaining());
29
    }
30
31
    public function testTicketsReserved()
32
    {
33
        $price = Price::fromNetCost(new Money(100, 'GBP'), new TaxRate(20));
34
        $ticketType = new TicketType('test', $price, 'Test ticket');
35
36
        $sut = new TicketCounter($ticketType, 10);
37
        $sut->ticketsReserved(5);
38
39
        self::assertEquals(5, $sut->getRemaining());
40
    }
41
42
    public function testTicketsReleased()
43
    {
@@ 42-51 (lines=10) @@
39
        self::assertEquals(5, $sut->getRemaining());
40
    }
41
42
    public function testTicketsReleased()
43
    {
44
        $price = Price::fromNetCost(new Money(100, 'GBP'), new TaxRate(20));
45
        $ticketType = new TicketType('test', $price, 'Test ticket');
46
47
        $sut = new TicketCounter($ticketType, 10);
48
        $sut->ticketsReleased(5);
49
50
        self::assertEquals(15, $sut->getRemaining());
51
    }
52
}
53