These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\ArticleBundle\Tests\Entity; |
||
4 | |||
5 | use Kunstmaan\ArticleBundle\Entity\AbstractArticleOverviewPage; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | |||
8 | class ArticleOverViewPage extends AbstractArticleOverviewPage |
||
9 | { |
||
10 | public function getArticleRepository($em) |
||
11 | { |
||
12 | return null; |
||
13 | } |
||
14 | } |
||
15 | |||
16 | /** |
||
17 | * Generated by PHPUnit_SkeletonGenerator on 2012-09-04 at 16:54:04. |
||
18 | */ |
||
19 | View Code Duplication | class AbstractArticleOverviewPageTest extends TestCase |
|
0 ignored issues
–
show
|
|||
20 | { |
||
21 | public function testGettersAndSetters() |
||
22 | { |
||
23 | $entity = new ArticleOverViewPage(); |
||
24 | $this->assertEquals('KunstmaanArticleBundle:AbstractArticleOverviewPage:service', $entity->getControllerAction()); |
||
25 | $this->assertEquals('@KunstmaanArticle/AbstractArticleOverviewPage/view.html.twig', $entity->getDefaultView()); |
||
26 | $this->assertInternalType('array', $entity->getPossibleChildTypes()); |
||
27 | $this->assertInternalType('array', $entity->getPagePartAdminConfigurations()); |
||
28 | } |
||
29 | } |
||
30 |
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.