public function testCanGetUrlToSamePageInAnotherLanguage() { $request = $this->mockRequest(); $request->shouldReceive('getScheme')->andReturn('http'); $request->shouldReceive('root')->andReturn('http://localhost'); $request->shouldReceive('getPathInfo')->andReturn('/admin/users'); $this->mockUrl($request); $this->assertEquals('http://localhost/en/admin/users', $this->url->switchLanguage('en')); }