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\PagePartBundle\Tests\Entity; |
||
4 | |||
5 | use Kunstmaan\PagePartBundle\Entity\LinePagePart; |
||
6 | |||
7 | /** |
||
8 | * LinePagePartTest |
||
9 | */ |
||
10 | View Code Duplication | class LinePagePartTest extends \PHPUnit_Framework_TestCase |
|
0 ignored issues
–
show
|
|||
11 | { |
||
12 | /** |
||
13 | * @var LinePagePart |
||
14 | */ |
||
15 | protected $object; |
||
16 | |||
17 | /** |
||
18 | * Sets up the fixture, for example, opens a network connection. |
||
19 | * This method is called before a test is executed. |
||
20 | */ |
||
21 | protected function setUp() |
||
22 | { |
||
23 | $this->object = new LinePagePart(); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Tears down the fixture, for example, closes a network connection. |
||
28 | * This method is called after a test is executed. |
||
29 | */ |
||
30 | protected function tearDown() |
||
31 | { |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @covers Kunstmaan\PagePartBundle\Entity\LinePagePart::__toString |
||
36 | */ |
||
37 | public function testToString() |
||
38 | { |
||
39 | $this->assertEquals('LinePagePart', $this->object->__toString()); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @covers Kunstmaan\PagePartBundle\Entity\LinePagePart::getDefaultView |
||
44 | */ |
||
45 | public function testGetDefaultView() |
||
46 | { |
||
47 | $this->assertEquals('KunstmaanPagePartBundle:LinePagePart:view.html.twig', $this->object->getDefaultView()); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @covers Kunstmaan\PagePartBundle\Entity\LinePagePart::getDefaultAdminType |
||
52 | */ |
||
53 | public function testGetDefaultAdminType() |
||
54 | { |
||
55 | $this->assertEquals('Kunstmaan\PagePartBundle\Form\LinePagePartAdminType', $this->object->getDefaultAdminType()); |
||
56 | } |
||
57 | |||
58 | } |
||
59 |
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.