gallery: Fix phan annotation for ImageGalleryBase::getImages
[mediawiki.git] / tests / phpunit / includes / installer / WebInstallerTest.php
blob8d5317c3100f2ddcad04ff2bfcd09dae0f3c5bd8
1 <?php
3 use MediaWiki\Installer\WebInstaller;
4 use MediaWiki\Request\FauxRequest;
6 class WebInstallerTest extends MediaWikiIntegrationTestCase {
7 /**
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 );
15 $this->assertSame(
16 $expected,
17 $webInstaller->getAcceptLanguage()
21 public function provideGetAcceptLanguage() {
22 return [
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' ],