Code Duplication    Length = 10-10 lines in 3 locations

tests/Eole/RestApi/PartyTest.php 3 locations

@@ 103-112 (lines=10) @@
100
        $this->assertEquals($partyId, $retrievedParty->id);
101
    }
102
103
    public function testGetPartyReturns404WhenPartyDoesNotExists()
104
    {
105
        $client = $this->createClient();
106
107
        $gameName = $this->games[0]->getName();
108
109
        $client->request('GET', "/api/games/$gameName/parties/978979");
110
111
        $this->assertEquals(Response::HTTP_NOT_FOUND, $client->getResponse()->getStatusCode());
112
    }
113
114
    public function testGetPartyReturns404WhenPartyExistsButInAnotherGame()
115
    {
@@ 126-135 (lines=10) @@
123
        $this->assertEquals(Response::HTTP_NOT_FOUND, $client->getResponse()->getStatusCode());
124
    }
125
126
    public function testGetPartyReturns404WhenGameNotFound()
127
    {
128
        $client = $this->createClient();
129
130
        $partyId = $this->party->getId();
131
132
        $client->request('GET', "/api/games/game-inexistant/parties/$partyId");
133
134
        $this->assertEquals(Response::HTTP_NOT_FOUND, $client->getResponse()->getStatusCode());
135
    }
136
137
    public function testCreatePartyReturnsForbiddenWhenNotLogged()
138
    {
@@ 137-146 (lines=10) @@
134
        $this->assertEquals(Response::HTTP_NOT_FOUND, $client->getResponse()->getStatusCode());
135
    }
136
137
    public function testCreatePartyReturnsForbiddenWhenNotLogged()
138
    {
139
        $client = $this->createClient();
140
141
        $gameName = $this->games[0]->getName();
142
143
        $client->request('POST', "/api/games/$gameName/parties");
144
145
        $this->assertEquals(Response::HTTP_UNAUTHORIZED, $client->getResponse()->getStatusCode());
146
    }
147
148
    public function testCreateParty()
149
    {