public function testLocaleDetection() { $request = new Request(); $this->assertNull($request->locale()); $request->params['locale'] = 'fr'; $this->assertEqual('fr', $request->locale()); $request->locale('de'); $this->assertEqual('de', $request->locale()); }