88class AcceptLanguageHeaderTest extends TestCase
99{
1010 /**
11- * @dataProvider dataForAsteriskSupport
11+ * @dataProvider dataForSupportedLanguagesWithAsterisk
1212 */
1313 public function test_match_with_asterisk ($ accept , $ expect , $ quality )
1414 {
15- $ this ->markTestSkipped ('WIP... ' );
1615 $ negotiator = (new AcceptHeaderNegotiator ('* ' ))->match ($ accept );
1716
1817 $ this ->assertSame ($ expect , $ negotiator ->value (), 'Expects ' . $ expect );
@@ -24,7 +23,6 @@ public function test_match_with_asterisk($accept, $expect, $quality)
2423 */
2524 public function test_with_preferred_languages ($ accept , $ expect , $ quality )
2625 {
27- $ this ->markTestIncomplete ('WIP... ' );
2826 $ negotiator = (new AcceptHeaderNegotiator ('de,fr,en ' ))->match ($ accept );
2927
3028 $ this ->assertSame ($ expect , $ negotiator ->value (), 'Expects ' . $ expect );
@@ -37,7 +35,7 @@ public function test_empty_accept_and_support_headers()
3735 $ this ->assertEquals ('' , $ match ->value (), 'Empty headers returns empty matched value ' );
3836 }
3937
40- public function dataForAsteriskSupport ()
38+ public function dataForSupportedLanguagesWithAsterisk ()
4139 {
4240 return [
4341 ['*;q=0.5, fr;q=0.9, en;q=0.8, de;q=0.7 ' , 'fr ' , 0.9 ],
@@ -50,7 +48,7 @@ public function dataForSupportedLanguages()
5048 {
5149 return [
5250 ['fr;q=0.7, en;q=0.8, de;q=0.9, *;q=0.5 ' , 'de ' , 0.9 ],
53- ['en-US,en;q=0.5 ' , 'en-US ' , 1.0 ],
51+ ['en-US,en;q=0.5 ' , 'en ' , 0.5 ],
5452 ['* ' , 'de ' , 1.0 ]
5553 ];
5654 }
0 commit comments