3 use MediaWiki\Installer\WebInstaller
;
4 use MediaWiki\Request\FauxRequest
;
6 class WebInstallerTest
extends MediaWikiIntegrationTestCase
{
8 * @covers \MediaWiki\Installer\WebInstaller::getAcceptLanguage
9 * @dataProvider provideGetAcceptLanguage
11 public function testGetAcceptLanguage( $expected, $acceptLanguage ) {
12 $request = new FauxRequest();
13 $request->setHeader( 'Accept-Language', $acceptLanguage );
14 $webInstaller = new WebInstaller( $request );
17 $webInstaller->getAcceptLanguage()
21 public function provideGetAcceptLanguage() {
23 [ 'de-ch', 'de-LI,de-CH;q=0.8,de;q=0.5,en;q=0.3' ],
24 // T189193: This should be 'de-de' or 'de'.
25 [ 'de-at', 'de-DE,de-AT;q=0.8,de;q=0.5,en;q=0.3' ],
26 // T187866: 'no' gets accepted.
27 [ 'no', 'no,nl;q=0.5' ],