src/Kunstmaan/AdminBundle/Tests/unit/Form/DashboardConfigurationTypeTest.php 1 location
|
@@ 12-29 (lines=18) @@
|
9 |
|
/** |
10 |
|
* Class DashboardConfigurationTypeTest |
11 |
|
*/ |
12 |
|
class DashboardConfigurationTypeTest extends TestCase |
13 |
|
{ |
14 |
|
public function testMethods() |
15 |
|
{ |
16 |
|
$type = new DashboardConfigurationType(); |
17 |
|
|
18 |
|
$builder = $this->createMock(FormBuilder::class); |
19 |
|
|
20 |
|
$builder->expects($this->exactly(2)) |
21 |
|
->method('add') |
22 |
|
->willReturn(true); |
23 |
|
|
24 |
|
/* @var FormBuilder $builder */ |
25 |
|
$type->buildForm($builder, []); |
26 |
|
|
27 |
|
$this->assertEquals('dashboardconfiguration', $type->getBlockPrefix()); |
28 |
|
} |
29 |
|
} |
30 |
|
|
src/Kunstmaan/AdminBundle/Tests/unit/Form/GroupTypeTest.php 1 location
|
@@ 12-29 (lines=18) @@
|
9 |
|
/** |
10 |
|
* Class GroupTypeTest |
11 |
|
*/ |
12 |
|
class GroupTypeTest extends TestCase |
13 |
|
{ |
14 |
|
public function testMethods() |
15 |
|
{ |
16 |
|
$type = new GroupType(); |
17 |
|
|
18 |
|
$builder = $this->createMock(FormBuilder::class); |
19 |
|
|
20 |
|
$builder->expects($this->exactly(2)) |
21 |
|
->method('add') |
22 |
|
->willReturn($builder); |
23 |
|
|
24 |
|
/* @var FormBuilder $builder */ |
25 |
|
$type->buildForm($builder, []); |
26 |
|
|
27 |
|
$this->assertEquals('group', $type->getBlockPrefix()); |
28 |
|
} |
29 |
|
} |
30 |
|
|
src/Kunstmaan/AdminBundle/Tests/unit/Form/RoleTypeTest.php 1 location
|
@@ 12-29 (lines=18) @@
|
9 |
|
/** |
10 |
|
* Class RoleTypeTest |
11 |
|
*/ |
12 |
|
class RoleTypeTest extends TestCase |
13 |
|
{ |
14 |
|
public function testMethods() |
15 |
|
{ |
16 |
|
$type = new RoleType(); |
17 |
|
|
18 |
|
$builder = $this->createMock(FormBuilder::class); |
19 |
|
|
20 |
|
$builder->expects($this->once()) |
21 |
|
->method('add') |
22 |
|
->willReturn(true); |
23 |
|
|
24 |
|
/* @var FormBuilder $builder */ |
25 |
|
$type->buildForm($builder, []); |
26 |
|
|
27 |
|
$this->assertEquals('role', $type->getBlockPrefix()); |
28 |
|
} |
29 |
|
} |
30 |
|
|
src/Kunstmaan/ArticleBundle/Tests/unit/Form/AbstractAuthorAdminTypeTest.php 1 location
|
@@ 12-23 (lines=12) @@
|
9 |
|
/** |
10 |
|
* Class AbstractAuthorAdminTypeTest |
11 |
|
*/ |
12 |
|
class AbstractAuthorAdminTypeTest extends TestCase |
13 |
|
{ |
14 |
|
public function testGettersAndSetters() |
15 |
|
{ |
16 |
|
$entity = new AbstractAuthorAdminType(); |
17 |
|
$builder = $this->createMock(FormBuilder::class); |
18 |
|
$builder->expects($this->exactly(2))->method('add')->willReturn($builder); |
19 |
|
$entity->buildForm($builder, []); |
20 |
|
|
21 |
|
$this->assertEquals('abstactauthor_form', $entity->getBlockPrefix()); |
22 |
|
} |
23 |
|
} |
24 |
|
|