Code Duplication    Length = 12-18 lines in 4 locations

src/Kunstmaan/AdminBundle/Tests/unit/Form/DashboardConfigurationTypeTest.php 1 location

@@ 13-30 (lines=18) @@
10
 * Class DashboardConfigurationTypeTest
11
 * @package Tests\Kunstmaan\AdminBundle\Form
12
 */
13
class DashboardConfigurationTypeTest extends PHPUnit_Framework_TestCase
14
{
15
    public function testMethods()
16
    {
17
        $type = new DashboardConfigurationType();
18
19
        $builder = $this->createMock(FormBuilder::class);
20
21
        $builder->expects($this->exactly(2))
22
            ->method('add')
23
            ->willReturn(true);
24
25
        /** @var FormBuilder $builder */
26
        $type->buildForm($builder, []);
27
28
        $this->assertEquals('dashboardconfiguration', $type->getBlockPrefix());
29
    }
30
}

src/Kunstmaan/AdminBundle/Tests/unit/Form/GroupTypeTest.php 1 location

@@ 14-31 (lines=18) @@
11
 * Class GroupTypeTest
12
 * @package Tests\Kunstmaan\AdminBundle\Form
13
 */
14
class GroupTypeTest extends PHPUnit_Framework_TestCase
15
{
16
    public function testMethods()
17
    {
18
        $type = new GroupType();
19
20
        $builder = $this->createMock(FormBuilder::class);
21
22
        $builder->expects($this->exactly(2))
23
            ->method('add')
24
            ->willReturn($builder);
25
26
        /** @var FormBuilder $builder */
27
        $type->buildForm($builder, []);
28
29
        $this->assertEquals('group', $type->getBlockPrefix());
30
    }
31
}

src/Kunstmaan/AdminBundle/Tests/unit/Form/RoleTypeTest.php 1 location

@@ 13-30 (lines=18) @@
10
 * Class RoleTypeTest
11
 * @package Tests\Kunstmaan\AdminBundle\Form
12
 */
13
class RoleTypeTest extends PHPUnit_Framework_TestCase
14
{
15
    public function testMethods()
16
    {
17
        $type = new RoleType();
18
19
        $builder = $this->createMock(FormBuilder::class);
20
21
        $builder->expects($this->once())
22
            ->method('add')
23
            ->willReturn(true);
24
25
        /** @var FormBuilder $builder */
26
        $type->buildForm($builder, []);
27
28
        $this->assertEquals('role', $type->getBlockPrefix());
29
    }
30
}

src/Kunstmaan/ArticleBundle/Tests/unit/Form/AbstractAuthorAdminTypeTest.php 1 location

@@ 13-24 (lines=12) @@
10
 * Class AbstractAuthorAdminTypeTest
11
 * @package Tests\Kunstmaan\ArticleBundle\Entity
12
 */
13
class AbstractAuthorAdminTypeTest extends PHPUnit_Framework_TestCase
14
{
15
    public function testGettersAndSetters()
16
    {
17
        $entity = new AbstractAuthorAdminType();
18
        $builder = $this->createMock(FormBuilder::class);
19
        $builder->expects($this->exactly(2))->method('add')->willReturn($builder);
20
        $entity->buildForm($builder, []);
21
22
        $this->assertEquals('abstactauthor_form', $entity->getBlockPrefix());
23
    }
24
}
25