Code Duplication    Length = 28-32 lines in 7 locations

src/Kunstmaan/PagePartBundle/Tests/unit/Form/HeaderPagePartAdminTypeTest.php 1 location

@@ 12-43 (lines=32) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 13:19:22.
11
 */
12
class HeaderPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var HeaderPagePartAdminType
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 HeaderPagePartAdminType();
27
    }
28
29
    public function testBuildForm()
30
    {
31
        $builder = $this->createMock(FormBuilderInterface::class);
32
        $builder->expects($this->exactly(2))->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\HeaderPagePart');
42
    }
43
}
44

src/Kunstmaan/PagePartBundle/Tests/unit/Form/LinePagePartAdminTypeTest.php 1 location

@@ 12-43 (lines=32) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 13:19:20.
11
 */
12
class LinePagePartAdminTypeTest extends PagePartAdminTypeTestCase
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

src/Kunstmaan/PagePartBundle/Tests/unit/Form/LinkPagePartAdminTypeTest.php 1 location

@@ 12-43 (lines=32) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 13:19:18.
11
 */
12
class LinkPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var LinkPagePartAdminType
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 LinkPagePartAdminType();
27
    }
28
29
    public function testBuildForm()
30
    {
31
        $builder = $this->createMock(FormBuilderInterface::class);
32
        $builder->expects($this->exactly(3))->method('add')->willReturnSelf();
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\LinkPagePart');
42
    }
43
}
44

src/Kunstmaan/PagePartBundle/Tests/unit/Form/RawHTMLPagePartAdminTypeTest.php 1 location

@@ 12-39 (lines=28) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 13:02:14.
11
 */
12
class RawHTMLPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var RawHTMLPagePartAdminType
16
     */
17
    protected $object;
18
19
    protected function setUp()
20
    {
21
        parent::setUp();
22
        $this->object = new RawHTMLPagePartAdminType();
23
    }
24
25
    public function testBuildForm()
26
    {
27
        $builder = $this->createMock(FormBuilderInterface::class);
28
        $builder->expects($this->once())->method('add');
29
30
        $this->object->buildForm($builder, array());
31
    }
32
33
    public function testConfigureOptions()
34
    {
35
        $this->object->configureOptions($this->resolver);
36
        $resolve = $this->resolver->resolve();
37
        $this->assertEquals($resolve['data_class'], 'Kunstmaan\PagePartBundle\Entity\RawHTMLPagePart');
38
    }
39
}
40

src/Kunstmaan/PagePartBundle/Tests/unit/Form/TextPagePartAdminTypeTest.php 1 location

@@ 12-39 (lines=28) @@
9
/**
10
 * Class TextPagePartAdminTypeTest
11
 */
12
class TextPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var TextPagePartAdminType
16
     */
17
    protected $object;
18
19
    protected function setUp()
20
    {
21
        parent::setUp();
22
        $this->object = new TextPagePartAdminType();
23
    }
24
25
    public function testBuildForm()
26
    {
27
        $builder = $this->createMock(FormBuilderInterface::class);
28
        $builder->expects($this->once())->method('add');
29
30
        $this->object->buildForm($builder, array());
31
    }
32
33
    public function testConfigureOptions()
34
    {
35
        $this->object->configureOptions($this->resolver);
36
        $resolve = $this->resolver->resolve();
37
        $this->assertEquals($resolve['data_class'], 'Kunstmaan\PagePartBundle\Entity\TextPagePart');
38
    }
39
}
40

src/Kunstmaan/PagePartBundle/Tests/unit/Form/TocPagePartAdminTypeTest.php 1 location

@@ 12-43 (lines=32) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 12:29:42.
11
 */
12
class TocPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var TocPagePartAdminType
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 TocPagePartAdminType();
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\TocPagePart');
42
    }
43
}
44

src/Kunstmaan/PagePartBundle/Tests/unit/Form/ToTopPagePartAdminTypeTest.php 1 location

@@ 12-39 (lines=28) @@
9
/**
10
 * Generated by PHPUnit_SkeletonGenerator on 2012-08-20 at 12:03:51.
11
 */
12
class ToTopPagePartAdminTypeTest extends PagePartAdminTypeTestCase
13
{
14
    /**
15
     * @var ToTopPagePartAdminType
16
     */
17
    protected $object;
18
19
    protected function setUp()
20
    {
21
        parent::setUp();
22
        $this->object = new ToTopPagePartAdminType();
23
    }
24
25
    public function testBuildForm()
26
    {
27
        $builder = $this->createMock(FormBuilderInterface::class);
28
        $builder->expects($this->never())->method('add');
29
30
        $this->object->buildForm($this->builder, array());
31
    }
32
33
    public function testConfigureOptions()
34
    {
35
        $this->object->configureOptions($this->resolver);
36
        $resolve = $this->resolver->resolve();
37
        $this->assertEquals($resolve['data_class'], 'Kunstmaan\PagePartBundle\Entity\ToTopPagePart');
38
    }
39
}
40