Skip to content

Commit 076eb53

Browse files
committed
Merge pull request #228 from ElectricMaxxx/add-failing-test
[POC] add failing test, correct core dependency
2 parents 63e9b66 + a803d96 commit 076eb53

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

Tests/Unit/DependencyInjection/CmfRoutingExtensionTest.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,56 @@ public function testWhitespaceInPriorities()
115115
'Acme\Foo' => 'acme_main.controller:indexAction',
116116
));
117117
}
118+
119+
public function testLoadBasePath()
120+
{
121+
$this->container->setParameter(
122+
'kernel.bundles',
123+
array(
124+
'CmfRoutingBundle' => true,
125+
'SonataDoctrinePHPCRAdminBundle' => true,
126+
)
127+
);
128+
129+
$this->load(array(
130+
'dynamic' => array(
131+
'enabled' => true,
132+
'persistence' => array(
133+
'phpcr' => array(
134+
'enabled' => true,
135+
'route_basepath' => '/cms/routes',
136+
),
137+
),
138+
),
139+
));
140+
141+
142+
$this->assertContainerBuilderHasParameter('cmf_routing.dynamic.persistence.phpcr.admin_basepath', '/cms/routes');
143+
}
144+
145+
public function testLoadBasePaths()
146+
{
147+
$this->container->setParameter(
148+
'kernel.bundles',
149+
array(
150+
'CmfRoutingBundle' => true,
151+
'SonataDoctrinePHPCRAdminBundle' => true,
152+
)
153+
);
154+
155+
$this->load(array(
156+
'dynamic' => array(
157+
'enabled' => true,
158+
'persistence' => array(
159+
'phpcr' => array(
160+
'enabled' => true,
161+
'route_basepaths' => array('/cms/routes', '/cms/test'),
162+
),
163+
),
164+
),
165+
));
166+
167+
$this->assertContainerBuilderHasParameter('cmf_routing.dynamic.persistence.phpcr.admin_basepath', '/cms/routes');
168+
$this->assertContainerBuilderHasParameter('cmf_routing.dynamic.persistence.phpcr.route_basepaths', array('/cms/routes', '/cms/test'));
169+
}
118170
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"symfony/framework-bundle": "~2.2"
2020
},
2121
"require-dev": {
22-
"symfony-cmf/core-bundle": "~1.0",
22+
"symfony-cmf/core-bundle": "~1.1",
2323
"symfony-cmf/testing": "1.1.*",
2424
"matthiasnoback/symfony-dependency-injection-test": "0.*",
2525
"matthiasnoback/symfony-config-test": "0.*",

0 commit comments

Comments
 (0)