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

Commit f39ef49

Browse files
committed
remove usage of different test environments
1 parent 05b6f68 commit f39ef49

File tree

8 files changed

+108
-154
lines changed

8 files changed

+108
-154
lines changed

tests/Resources/app/AppKernel.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,10 @@ public function configure()
1818
{
1919
$this->requireBundleSet('default');
2020

21-
if ('phpcr' === $this->environment) {
22-
$this->requireBundleSets(array(
23-
'phpcr_odm',
24-
'sonata_admin_phpcr',
25-
));
26-
} elseif ('orm' === $this->environment) {
27-
$this->requireBundleSet('doctrine_orm');
28-
}
21+
$this->requireBundleSets(array(
22+
'phpcr_odm',
23+
'sonata_admin_phpcr',
24+
));
2925

3026
$this->addBundles(array(
3127
new Sonata\SeoBundle\SonataSeoBundle(),
@@ -53,7 +49,6 @@ public function configure()
5349
public function registerContainerConfiguration(LoaderInterface $loader)
5450
{
5551
$loader->load(__DIR__.'/config/config.php');
56-
$loader->load(__DIR__.'/config/config_'.$this->environment.'.php');
5752
$loader->load(__DIR__.'/config/admin-test.xml');
5853
}
5954
}

tests/Resources/app/config/cmf_sonata_admin_integration.orm.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/Resources/app/config/cmf_sonata_admin_integration.phpcr.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

tests/Resources/app/config/cmf_sonata_admin_integration.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ cmf_sonata_phpcr_admin_integration:
22
bundles:
33
seo: ~
44
core: ~
5+
menu: ~
56
content:
67
ivory_ckeditor: { config_name: cmf_sonata_admin_integration }
78

9+
routing:
10+
basepath: /test/routing
11+
block:
12+
basepath: /test/blocks
13+
menu_basepath: /test/menus
14+
815
framework:
916
translator: { enabled: true, fallback: en }
1017
serializer: true
@@ -13,8 +20,15 @@ cmf_seo:
1320
title: "Default | %%content_title%%"
1421
description: "Default description. %%content_description%%"
1522
original_route_pattern: canonical
23+
persistence: { phpcr: true }
24+
alternate_locale: ~
1625

1726
cmf_routing:
27+
dynamic:
28+
locales: [de, en]
29+
persistence:
30+
phpcr:
31+
route_basepaths: [/test/routing]
1832
chain:
1933
routers_by_id:
2034
cmf_routing.dynamic_router: 20
@@ -24,9 +38,85 @@ twig:
2438
exception_controller: cmf_seo.error.suggestion_provider.controller:listAction
2539

2640
cmf_core:
41+
persistence:
42+
phpcr:
43+
basepath: /test
2744
multilang:
2845
locales: [en, de]
2946

3047
ivory_ck_editor:
3148
configs:
3249
cmf_sonata_admin_integration: { toolbar: standard }
50+
51+
cmf_menu:
52+
persistence:
53+
phpcr:
54+
menu_basepath: /test/menus
55+
56+
services:
57+
sonata.admin.seo_content:
58+
class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\SeoAwareContentAdmin
59+
tags:
60+
- { name: sonata.admin, manager_type: doctrine_phpcr, label_catalogue: CmfSeoBundle, group: dashboard.cmf, label: dashboard.label_seo_content, label_translator_strategy: sonata.admin.label.strategy.underscore}
61+
arguments:
62+
- ~
63+
- Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\SeoAwareContent
64+
- SonataAdminBundle:CRUD
65+
calls:
66+
- [ setTranslationDomain, [CmfSonataPhpcrAdminIntegrationBundle]]
67+
- [ setRouteBuilder, ['@sonata.admin.route.path_info_slashes']]
68+
- [ setRootPath, [/test/content]]
69+
sonata.admin.core_examples:
70+
class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\CoreExtensionsAdmin
71+
tags:
72+
- { name: sonata.admin, manager_type: doctrine_phpcr, label_catalogue: CmfSeoBundle, group: dashboard.cmf, label: dashboard.label_seo_content, label_translator_strategy: sonata.admin.label.strategy.underscore}
73+
arguments:
74+
- ~
75+
- Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\CoreExtensionsAwareContent
76+
- SonataAdminBundle:CRUD
77+
calls:
78+
- [ setTranslationDomain, [CmfSonataPhpcrAdminIntegrationBundle]]
79+
- [ setRouteBuilder, ['@sonata.admin.route.path_info_slashes']]
80+
- [ setRootPath, [/test/core]]
81+
82+
sonata.admin.menu:
83+
class: Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Admin\MenuContentAdmin
84+
tags:
85+
- { name: sonata.admin, manager_type: doctrine_phpcr, group: Test, label: Test Content }
86+
arguments:
87+
- ~
88+
- Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Resources\Document\MenuContent
89+
- SonataAdminBundle:CRUD
90+
91+
sonata_admin:
92+
extensions:
93+
cmf_sonata_phpcr_admin_integration.seo.extension.metadata:
94+
implements:
95+
- Symfony\Cmf\Bundle\SeoBundle\SeoAwareInterface
96+
cmf_sonata_phpcr_admin_integration.menu.extension.menu_node_referrers:
97+
implements:
98+
- Symfony\Cmf\Bundle\MenuBundle\Model\MenuNodeReferrersInterface
99+
cmf_sonata_phpcr_admin_integration.routing.extension.frontend_link:
100+
implements:
101+
- Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
102+
extends:
103+
- Symfony\Component\Routing\Route
104+
cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.publishable:
105+
implements:
106+
- Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface
107+
cmf_sonata_phpcr_admin_integration.core.extension.publish_workflow.time_period:
108+
implements:
109+
- Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface
110+
dashboard:
111+
groups:
112+
content:
113+
label: Content
114+
items:
115+
- sonata.admin.seo_content
116+
117+
cmf_content:
118+
persistence:
119+
phpcr:
120+
content_basepath: /test/contents
121+
122+

tests/Resources/app/config/config.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
$container->setParameter('cmf_testing.bundle_fqn', 'Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle');
1313
$loader->import(CMF_TEST_CONFIG_DIR.'/default.php');
1414
$loader->import(__DIR__.'/cmf_sonata_admin_integration.yml');
15-
$loader->import(CMF_TEST_CONFIG_DIR.'/sonata_admin.php'); // todo: move that file into that bundle
15+
$loader->import(__DIR__.'/sonata_admin.yml');
16+
$loader->import(CMF_TEST_CONFIG_DIR.'/phpcr_odm.php');

tests/Resources/app/config/config_orm.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/Resources/app/config/config_phpcr.php

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonata_admin:
2+
dashboard:
3+
blocks:
4+
-
5+
position: left
6+
type: sonata.admin.block.admin_list
7+
8+
sonata_block:
9+
default_contexts: [cms]
10+
blocks:
11+
sonata.admin.block.admin_list:
12+
contexts: [admin]

0 commit comments

Comments
 (0)