We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fbd5c74 + e9e9659 commit edbe04bCopy full SHA for edbe04b
Doctrine/Orm/RouteProvider.php
@@ -62,7 +62,7 @@ protected function getCandidates($url)
62
*/
63
public function getRouteByName($name, $parameters = array())
64
{
65
- $route = $this->getRoutesRepository()->findBy(array('name' => $name));
+ $route = $this->getRoutesRepository()->findOneBy(array('name' => $name));
66
if (!$route) {
67
throw new RouteNotFoundException("No route found for name '$name'");
68
}
Tests/Unit/Doctrine/Orm/RouteProviderTest.php
@@ -46,7 +46,7 @@ public function testGetRouteByName()
46
47
$this->objectRepository
48
->expects($this->any())
49
- ->method('findBy')
+ ->method('findOneBy')
50
->with(array('name' => '/cms/routes/test-route'))
51
->will($this->returnValue($this->route))
52
;
0 commit comments