1<?php
2
3namespace dokuwiki\plugin\reqlang\test;
4
5use DokuWikiTest;
6
7/**
8 * FIXME tests for the reqlang plugin
9 *
10 * @group plugin_reqlang
11 * @group plugins
12 */
13class ParseAcceptLangTest extends DokuWikiTest
14{
15    public function testHeaderParsing()
16    {
17
18        $header = 'en-ca,en-US ; q=0.6 , en;q=0.8,de-de;q=0.4';
19        $plugin = new \action_plugin_reqlang();
20
21        $expect = ['en-ca','en','en-us','de-de', 'de'];
22
23        $this->assertSame($expect, $plugin->parseAcceptLang($header));
24    }
25}
26