Skip to content

Commit 024734e

Browse files
committed
fix tests
1 parent dd05425 commit 024734e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Tests/Routing/ContentAwareGeneratorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testGenerateEmptyRouteString()
9696

9797
public function testGenerateRouteMultilang()
9898
{
99-
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getRouteContent'));
99+
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getContent'));
100100
$route_en->setLocale('en');
101101
$route_de = $this->routeDocument;
102102
$route_de->setLocale('de');
@@ -106,7 +106,7 @@ public function testGenerateRouteMultilang()
106106
->will($this->returnValue(array($route_en, $route_de)))
107107
;
108108
$route_en->expects($this->once())
109-
->method('getRouteContent')
109+
->method('getContent')
110110
->will($this->returnValue($this->contentDocument))
111111
;
112112
$route_en->expects($this->never())
@@ -122,7 +122,7 @@ public function testGenerateRouteMultilang()
122122

123123
public function testGenerateRouteMultilangLocaleNomatch()
124124
{
125-
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getRouteContent'));
125+
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getContent'));
126126
$route_en->setLocale('en');
127127
$route_de = $this->routeDocument;
128128
$route_de->setLocale('de');
@@ -132,7 +132,7 @@ public function testGenerateRouteMultilangLocaleNomatch()
132132
->will($this->returnValue(array($route_en, $route_de)))
133133
;
134134
$route_en->expects($this->once())
135-
->method('getRouteContent')
135+
->method('getContent')
136136
->will($this->returnValue($this->contentDocument))
137137
;
138138
$route_en->expects($this->once())
@@ -148,7 +148,7 @@ public function testGenerateRouteMultilangLocaleNomatch()
148148

149149
public function testGenerateNoncmfRouteMultilang()
150150
{
151-
$route_en = $this->buildMock('Symfony\\Component\\Routing\\Route', array('getDefaults', 'compile', 'getRouteContent'));
151+
$route_en = $this->buildMock('Symfony\\Component\\Routing\\Route', array('getDefaults', 'compile', 'getContent'));
152152

153153
$route_en->expects($this->once())
154154
->method('compile')
@@ -161,7 +161,7 @@ public function testGenerateNoncmfRouteMultilang()
161161
public function testGenerateRoutenameMultilang()
162162
{
163163
$name = 'foo/bar';
164-
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getRouteContent'));
164+
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getContent'));
165165
$route_en->setLocale('en');
166166
$route_de = $this->routeDocument;
167167
$route_de->setLocale('de');
@@ -176,7 +176,7 @@ public function testGenerateRoutenameMultilang()
176176
->will($this->returnValue(array($route_en, $route_de)))
177177
;
178178
$route_en->expects($this->once())
179-
->method('getRouteContent')
179+
->method('getContent')
180180
->will($this->returnValue($this->contentDocument))
181181
;
182182
$route_en->expects($this->never())

Tests/Routing/RouteMock.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ public function setLocale($locale)
1313
{
1414
$this->locale = $locale;
1515
}
16-
public function getRouteContent()
16+
17+
public function getContent()
1718
{
1819
return null;
1920
}
21+
2022
public function getDefaults()
2123
{
2224
$defaults = array();
@@ -26,6 +28,7 @@ public function getDefaults()
2628

2729
return $defaults;
2830
}
31+
2932
public function getRequirement($key)
3033
{
3134
if (! $key == '_locale') {
@@ -34,6 +37,7 @@ public function getRequirement($key)
3437

3538
return $this->locale;
3639
}
40+
3741
public function getRouteKey()
3842
{
3943
return null;

0 commit comments

Comments
 (0)