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\Form; |
||
4 | |||
5 | use Kunstmaan\PagePartBundle\Form\LinePagePartAdminType; |
||
6 | use Kunstmaan\PagePartBundle\Tests\unit\Form\PagePartAdminTypeTestCase; |
||
7 | use Symfony\Component\Form\FormBuilderInterface; |
||
8 | |||
9 | /** |
||
10 | * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 13:19:20. |
||
11 | */ |
||
12 | View Code Duplication | class LinePagePartAdminTypeTest extends PagePartAdminTypeTestCase |
|
0 ignored issues
–
show
|
|||
13 | { |
||
14 | /** |
||
15 | * @var LinePagePartAdminType |
||
16 | */ |
||
17 | protected $object; |
||
18 | |||
19 | /** |
||
20 | * Sets up the fixture, for example, opens a network connection. |
||
21 | * This method is called before a test is executed. |
||
22 | */ |
||
23 | protected function setUp() |
||
24 | { |
||
25 | parent::setUp(); |
||
26 | $this->object = new LinePagePartAdminType(); |
||
27 | } |
||
28 | |||
29 | public function testBuildForm() |
||
30 | { |
||
31 | $builder = $this->createMock(FormBuilderInterface::class); |
||
32 | $builder->expects($this->never())->method('add'); |
||
33 | |||
34 | $this->object->buildForm($builder, array()); |
||
35 | } |
||
36 | |||
37 | public function testConfigureOptions() |
||
38 | { |
||
39 | $this->object->configureOptions($this->resolver); |
||
40 | $resolve = $this->resolver->resolve(); |
||
41 | $this->assertEquals($resolve['data_class'], 'Kunstmaan\PagePartBundle\Entity\LinePagePart'); |
||
42 | } |
||
43 | } |
||
44 |
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.