Code Duplication    Length = 23-23 lines in 6 locations

src/OSS/CoreBundle/Tests/Entity/PlayerSkillsTest.php 6 locations

@@ 39-61 (lines=23) @@
36
        $this->assertEquals(1, $this->playerSkills->getDribbling());
37
    }
38
    
39
    public function testSetValues()
40
    {
41
        $this->playerSkills->setTackling(10);
42
        $this->assertEquals(10, $this->playerSkills->getTackling());
43
        $this->playerSkills->setPassing(10);
44
        $this->assertEquals(10, $this->playerSkills->getPassing());
45
        $this->playerSkills->setShooting(10);
46
        $this->assertEquals(10, $this->playerSkills->getShooting());
47
        $this->playerSkills->setHeading(10);
48
        $this->assertEquals(10, $this->playerSkills->getHeading());
49
        $this->playerSkills->setSpeed(10);
50
        $this->assertEquals(10, $this->playerSkills->getSpeed());
51
        $this->playerSkills->setCrossing(10);
52
        $this->assertEquals(10, $this->playerSkills->getCrossing());
53
        $this->playerSkills->setTechnics(10);
54
        $this->assertEquals(10, $this->playerSkills->getTechnics());
55
        $this->playerSkills->setIntelligence(10);
56
        $this->assertEquals(10, $this->playerSkills->getIntelligence());
57
        $this->playerSkills->setSafety(10);
58
        $this->assertEquals(10, $this->playerSkills->getSafety());
59
        $this->playerSkills->setDribbling(10);
60
        $this->assertEquals(10, $this->playerSkills->getDribbling());
61
    }
62
    
63
    public function testSetValuesOverLimit()
64
    {
@@ 63-85 (lines=23) @@
60
        $this->assertEquals(10, $this->playerSkills->getDribbling());
61
    }
62
    
63
    public function testSetValuesOverLimit()
64
    {
65
        $this->playerSkills->setTackling(110);
66
        $this->assertEquals(100, $this->playerSkills->getTackling());
67
        $this->playerSkills->setPassing(110);
68
        $this->assertEquals(100, $this->playerSkills->getPassing());
69
        $this->playerSkills->setShooting(110);
70
        $this->assertEquals(100, $this->playerSkills->getShooting());
71
        $this->playerSkills->setHeading(110);
72
        $this->assertEquals(100, $this->playerSkills->getHeading());
73
        $this->playerSkills->setSpeed(110);
74
        $this->assertEquals(100, $this->playerSkills->getSpeed());
75
        $this->playerSkills->setCrossing(110);
76
        $this->assertEquals(100, $this->playerSkills->getCrossing());
77
        $this->playerSkills->setTechnics(110);
78
        $this->assertEquals(100, $this->playerSkills->getTechnics());
79
        $this->playerSkills->setIntelligence(110);
80
        $this->assertEquals(100, $this->playerSkills->getIntelligence());
81
        $this->playerSkills->setSafety(110);
82
        $this->assertEquals(100, $this->playerSkills->getSafety());
83
        $this->playerSkills->setDribbling(110);
84
        $this->assertEquals(100, $this->playerSkills->getDribbling());
85
    }
86
    
87
    public function testSetValuesUnderLimit()
88
    {
@@ 87-109 (lines=23) @@
84
        $this->assertEquals(100, $this->playerSkills->getDribbling());
85
    }
86
    
87
    public function testSetValuesUnderLimit()
88
    {
89
        $this->playerSkills->setTackling(0);
90
        $this->assertEquals(1, $this->playerSkills->getTackling());
91
        $this->playerSkills->setPassing(0);
92
        $this->assertEquals(1, $this->playerSkills->getPassing());
93
        $this->playerSkills->setShooting(0);
94
        $this->assertEquals(1, $this->playerSkills->getShooting());
95
        $this->playerSkills->setHeading(0);
96
        $this->assertEquals(1, $this->playerSkills->getHeading());
97
        $this->playerSkills->setSpeed(0);
98
        $this->assertEquals(1, $this->playerSkills->getSpeed());
99
        $this->playerSkills->setCrossing(0);
100
        $this->assertEquals(1, $this->playerSkills->getCrossing());
101
        $this->playerSkills->setTechnics(0);
102
        $this->assertEquals(1, $this->playerSkills->getTechnics());
103
        $this->playerSkills->setIntelligence(0);
104
        $this->assertEquals(1, $this->playerSkills->getIntelligence());
105
        $this->playerSkills->setSafety(0);
106
        $this->assertEquals(1, $this->playerSkills->getSafety());
107
        $this->playerSkills->setDribbling(0);
108
        $this->assertEquals(1, $this->playerSkills->getDribbling());
109
    }
110
    
111
    public function testIncreaseValues()
112
    {
@@ 111-133 (lines=23) @@
108
        $this->assertEquals(1, $this->playerSkills->getDribbling());
109
    }
110
    
111
    public function testIncreaseValues()
112
    {
113
        $this->playerSkills->increaseTackling(10);
114
        $this->assertEquals(11, $this->playerSkills->getTackling());
115
        $this->playerSkills->increasePassing(10);
116
        $this->assertEquals(11, $this->playerSkills->getPassing());
117
        $this->playerSkills->increaseShooting(10);
118
        $this->assertEquals(11, $this->playerSkills->getShooting());
119
        $this->playerSkills->increaseHeading(10);
120
        $this->assertEquals(11, $this->playerSkills->getHeading());
121
        $this->playerSkills->increaseSpeed(10);
122
        $this->assertEquals(11, $this->playerSkills->getSpeed());
123
        $this->playerSkills->increaseCrossing(10);
124
        $this->assertEquals(11, $this->playerSkills->getCrossing());
125
        $this->playerSkills->increaseTechnics(10);
126
        $this->assertEquals(11, $this->playerSkills->getTechnics());
127
        $this->playerSkills->increaseIntelligence(10);
128
        $this->assertEquals(11, $this->playerSkills->getIntelligence());
129
        $this->playerSkills->increaseSafety(10);
130
        $this->assertEquals(11, $this->playerSkills->getSafety());
131
        $this->playerSkills->increaseDribbling(10);
132
        $this->assertEquals(11, $this->playerSkills->getDribbling());
133
    }
134
    
135
    public function testIncreaseValuesOverLimit()
136
    {
@@ 135-157 (lines=23) @@
132
        $this->assertEquals(11, $this->playerSkills->getDribbling());
133
    }
134
    
135
    public function testIncreaseValuesOverLimit()
136
    {
137
        $this->playerSkills->increaseTackling(110);
138
        $this->assertEquals(100, $this->playerSkills->getTackling());
139
        $this->playerSkills->increasePassing(110);
140
        $this->assertEquals(100, $this->playerSkills->getPassing());
141
        $this->playerSkills->increaseShooting(110);
142
        $this->assertEquals(100, $this->playerSkills->getShooting());
143
        $this->playerSkills->increaseHeading(110);
144
        $this->assertEquals(100, $this->playerSkills->getHeading());
145
        $this->playerSkills->increaseSpeed(110);
146
        $this->assertEquals(100, $this->playerSkills->getSpeed());
147
        $this->playerSkills->increaseCrossing(110);
148
        $this->assertEquals(100, $this->playerSkills->getCrossing());
149
        $this->playerSkills->increaseTechnics(110);
150
        $this->assertEquals(100, $this->playerSkills->getTechnics());
151
        $this->playerSkills->increaseIntelligence(110);
152
        $this->assertEquals(100, $this->playerSkills->getIntelligence());
153
        $this->playerSkills->increaseSafety(110);
154
        $this->assertEquals(100, $this->playerSkills->getSafety());
155
        $this->playerSkills->increaseDribbling(110);
156
        $this->assertEquals(100, $this->playerSkills->getDribbling());
157
    }
158
    
159
    public function testIncreaseValuesUnderLimit()
160
    {
@@ 241-263 (lines=23) @@
238
        $this->assertEquals(100, $this->playerSkills->getDribbling());
239
    }
240
241
    public function testDecreaseValuesUnderLimit()
242
    {
243
        $this->playerSkills->decreaseTackling(1);
244
        $this->assertEquals(1, $this->playerSkills->getTackling());
245
        $this->playerSkills->decreasePassing(1);
246
        $this->assertEquals(1, $this->playerSkills->getPassing());
247
        $this->playerSkills->decreaseShooting(1);
248
        $this->assertEquals(1, $this->playerSkills->getShooting());
249
        $this->playerSkills->decreaseHeading(1);
250
        $this->assertEquals(1, $this->playerSkills->getHeading());
251
        $this->playerSkills->decreaseSpeed(1);
252
        $this->assertEquals(1, $this->playerSkills->getSpeed());
253
        $this->playerSkills->decreaseCrossing(1);
254
        $this->assertEquals(1, $this->playerSkills->getCrossing());
255
        $this->playerSkills->decreaseTechnics(1);
256
        $this->assertEquals(1, $this->playerSkills->getTechnics());
257
        $this->playerSkills->decreaseIntelligence(1);
258
        $this->assertEquals(1, $this->playerSkills->getIntelligence());
259
        $this->playerSkills->decreaseSafety(1);
260
        $this->assertEquals(1, $this->playerSkills->getSafety());
261
        $this->playerSkills->decreaseDribbling(1);
262
        $this->assertEquals(1, $this->playerSkills->getDribbling());
263
    }
264
    
265
    public function testInitRandomValues()
266
    {