System URI is the URI for internal content controller.
E.g. /content/location/123/full.
If current route is not an URLAlias, then the current Pathinfo is returned.
public getSystemUriString ( ) : null | string | ||
Résultat | null | string |
public function testGetSystemUriString() { $locationId = 123; $viewType = 'full'; $expectedSystemUriString = '/content/location/123/full'; $request = Request::create('/ezdemo_site/foo/bar'); $request->attributes->set('_route', UrlAliasRouter::URL_ALIAS_ROUTE_NAME); $request->attributes->set('locationId', $locationId); $request->attributes->set('viewType', $viewType); $this->router->expects($this->once())->method('generate')->with('_ezpublishLocation', array('locationId' => $locationId, 'viewType' => $viewType))->will($this->returnValue($expectedSystemUriString)); $this->helper->setRequest($request); $this->assertSame($expectedSystemUriString, $this->helper->getSystemUriString()); }