Skip to content

Commit dd05425

Browse files
committed
clean up getRouteContent renaming
1 parent df985d0 commit dd05425

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ContentAwareGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function getBestLocaleRoute(SymfonyRoute $route, $parameters)
103103
}
104104
$locale = $this->getLocale($parameters);
105105
if (! $this->checkLocaleRequirement($route, $locale)) {
106-
$content = $route->getRouteContent();
106+
$content = $route->getContent();
107107
if ($content instanceof RouteAwareInterface) {
108108
$routes = $content->getRoutes();
109109
$contentRoute = $this->getRouteByLocale($routes, $locale);

Enhancer/RouteContentEnhancer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function enhance(array $defaults, Request $request)
5858
}
5959
$route = $defaults[$this->routefield];
6060

61-
$content = $route->getRouteContent();
61+
$content = $route->getContent();
6262
if (! $content) {
6363
// we have no content
6464
return $defaults;

Tests/Enhancer/RouteContentEnhancerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RouteContentEnhancerTest extends CmfUnitTestCase
2121
public function setUp()
2222
{
2323
$this->document = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteObject',
24-
array('getRouteContent', 'getRouteDefaults', 'getUrl'));
24+
array('getContent', 'getRouteDefaults', 'getUrl'));
2525

2626
$this->mapper = new RouteContentEnhancer(RouteObjectInterface::ROUTE_OBJECT, '_content');
2727

@@ -32,7 +32,7 @@ public function testContent()
3232
{
3333
$targetDocument = new TargetDocument();
3434
$this->document->expects($this->once())
35-
->method('getRouteContent')
35+
->method('getContent')
3636
->will($this->returnValue($targetDocument));
3737

3838
$defaults = array(RouteObjectInterface::ROUTE_OBJECT => $this->document);
@@ -44,7 +44,7 @@ public function testContent()
4444
public function testFieldAlreadyThere()
4545
{
4646
$this->document->expects($this->never())
47-
->method('getRouteContent')
47+
->method('getContent')
4848
;
4949

5050
$defaults = array(RouteObjectInterface::ROUTE_OBJECT => $this->document, '_content' => 'foo');
@@ -55,7 +55,7 @@ public function testFieldAlreadyThere()
5555
public function testNoContent()
5656
{
5757
$this->document->expects($this->once())
58-
->method('getRouteContent')
58+
->method('getContent')
5959
->will($this->returnValue(null));
6060

6161
$defaults = array(RouteObjectInterface::ROUTE_OBJECT => $this->document);

0 commit comments

Comments
 (0)