setLocale() public method

Sets the locale.
public setLocale ( string $locale )
$locale string
 public function testPathWithLocale()
 {
     $matcher = new RequestMatcher();
     $request = Request::create('/en/login');
     $session = new Session(new ArraySessionStorage());
     $session->setLocale('en');
     $request->setSession($session);
     $matcher->matchPath('^/{_locale}/login$');
     $this->assertTrue($matcher->matches($request));
     $session->setLocale('de');
     $this->assertFalse($matcher->matches($request));
 }