Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 8ab1da9

Browse files
committed
create single cora admin factor test for DI
1 parent d7a0785 commit 8ab1da9

File tree

3 files changed

+68
-46
lines changed

3 files changed

+68
-46
lines changed

tests/Unit/DependencyInjection/CmfSonataAdminExtensionTest.php

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -45,51 +45,6 @@ public function testThatBundlesAreConfigured()
4545
$this->load([]);
4646
}
4747

48-
49-
public function testCoreDefaults()
50-
{
51-
$this->container->setParameter(
52-
'kernel.bundles',
53-
array(
54-
'CmfRoutingBundle' => true,
55-
'SonataDoctrinePHPCRAdminBundle' => true,
56-
'DoctrinePHPCRBundle' => true,
57-
'CmfCoreBundle' => true,
58-
)
59-
);
60-
61-
$this->load([
62-
'bundles' => [
63-
'core' => [
64-
'enabled' => true,
65-
'extensions' => [
66-
'publishable' => ['form_group' => 'publishable_form'],
67-
'publish_time' => ['form_group' => 'publish_time_form'],
68-
],
69-
],
70-
],
71-
]);
72-
73-
$this->assertContainerBuilderHasParameter(
74-
'cmf_sonata_phpcr_admin_integration.core.extension.publishable.form_group',
75-
'publishable_form'
76-
);
77-
$this->assertContainerBuilderHasParameter(
78-
'cmf_sonata_phpcr_admin_integration.core.extension.publish_time.form_group',
79-
'publish_time_form'
80-
);
81-
82-
$this->assertContainerBuilderHasService(
83-
'cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.time_period'
84-
);
85-
$this->assertContainerBuilderHasService(
86-
'cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.publishable'
87-
);
88-
$this->assertContainerBuilderHasService(
89-
'cmf_sonata_phpcr_admin_integration.core.extension.child'
90-
);
91-
}
92-
9348
public function testEnhancerExists()
9449
{
9550
$this->container->setParameter(
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
3+
namespace Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Unit\DependencyInjection\Factory;
4+
5+
/**
6+
* @author Maximilian Berghoff <[email protected]>
7+
*/
8+
class CoreAdminFactoryTest extends AbstractFactoryTest
9+
{
10+
public function testParametersBundle()
11+
{
12+
$this->container->setParameter('kernel.bundles', [
13+
'CmfCoreBundle' => true,
14+
'SonataDoctrinePHPCRAdminBundle' => true,
15+
'CmfSonataPhpcrAdminIntegrationBundle.' => true,
16+
]);
17+
$this->load([
18+
'bundles' => [
19+
'core' => [
20+
'enabled' => true,
21+
'extensions' => [
22+
'publishable' => ['form_group' => 'publishable_form'],
23+
'publish_time' => ['form_group' => 'publish_time_form'],
24+
],
25+
],
26+
],
27+
]);
28+
29+
$this->assertContainerBuilderHasParameter(
30+
'cmf_sonata_phpcr_admin_integration.core.extension.publishable.form_group',
31+
'publishable_form'
32+
);
33+
$this->assertContainerBuilderHasParameter(
34+
'cmf_sonata_phpcr_admin_integration.core.extension.publish_time.form_group',
35+
'publish_time_form'
36+
);
37+
}
38+
39+
public function testAdminServicesBundle()
40+
{
41+
42+
$this->container->setParameter(
43+
'kernel.bundles',
44+
[
45+
'CmfRoutingBundle' => true,
46+
'SonataDoctrinePHPCRAdminBundle' => true,
47+
'DoctrinePHPCRBundle' => true,
48+
'CmfCoreBundle' => true,
49+
]
50+
);
51+
52+
$this->load([
53+
'bundles' => [
54+
'core' => true,
55+
],
56+
]);
57+
58+
$this->assertContainerBuilderHasService(
59+
'cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.time_period'
60+
);
61+
$this->assertContainerBuilderHasService(
62+
'cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.publishable'
63+
);
64+
$this->assertContainerBuilderHasService(
65+
'cmf_sonata_phpcr_admin_integration.core.extension.child'
66+
);
67+
}
68+
}

tests/Unit/DependencyInjection/Factory/SeoAdminFactoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
class SeoAdminFactoryTest extends AbstractFactoryTest
1818
{
19-
2019
public function testParametersBundle()
2120
{
2221
$this->container->setParameter(

0 commit comments

Comments
 (0)