Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 13 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function testNewGenerationBackExercise() |
||
18 | { |
||
19 | $e = new NewGenerationBack(); |
||
20 | $this->assertEquals('The new generation is back', $e->getName()); |
||
21 | $this->assertEquals('Use generators returning a value', $e->getDescription()); |
||
22 | $this->assertEquals(ExerciseType::CLI, $e->getType()); |
||
23 | |||
24 | $this->assertEquals([1, 2, 3], $e->getArgs()); |
||
25 | |||
26 | $this->assertInstanceOf(SolutionInterface::class, $e->getSolution()); |
||
27 | $this->assertFileExists(realpath($e->getProblem())); |
||
28 | $this->assertNull($e->tearDown()); |
||
29 | } |
||
30 | } |
||
31 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.