22 [
'text/foo',
'text/BAR',
'application/zuul' ],
23 [
'text/xzy',
'text/bar' ],
28 [
'text/foo',
'text/BAR',
'application/zuul' ],
29 [
'text/xzy',
'text/xoo' ],
34 [
'text/foo',
'text/bar',
'application/zuul' ],
35 [
'text/xoo',
'text/BAR',
'text/foo' ],
40 [
'text/foo',
'text/BAR',
'application/zuul' ],
46 [
'text/foo',
'text/BAR',
'application/zuul' ],
47 [
'text/xoo',
'*/*' ],
52 [
'text/foo',
'text/BAR',
'application/zuul' ],
53 [
'application/*',
'text/foo' ],
65 $actual = $negotiator->getFirstSupportedValue( $accepted, $default );
67 $this->assertEquals( $expected, $actual );
79 [
'text/foo',
'text/BAR',
'application/zuul' ],
80 [
'text/xzy' => 1,
'text/bar' => 0.5 ],
85 [
'text/foo',
'text/BAR',
'application/zuul' ],
86 [
'text/xzy' => 1,
'text/xoo' => 0.5 ],
91 [
'text/foo',
'text/BAR',
'application/zuul' ],
92 [
'text/foo' => 0.3,
'text/BAR' => 0.8,
'application/zuul' => 0.5 ],
97 [
'text/foo',
'text/BAR',
'application/zuul' ],
98 [
'text/foo' => 0,
'text/xoo' => 1 ],
103 [
'text/foo',
'text/BAR',
'application/zuul' ],
104 [
'text/xoo' => 0.5,
'*' => 0.1 ],
109 [
'text/foo',
'text/BAR',
'application/zuul' ],
110 [
'text/xoo' => 0.5,
'*/*' => 0.1 ],
115 [
'text/foo',
'text/BAR',
'application/zuul' ],
116 [
'text/foo' => 0.3,
'application/*' => 0.8 ],
121 [
'application/rdf+xml',
'text/json',
'text/html' ],
122 [
'*/*' => 1,
'text/html' => 1 ],
127 [
'application/rdf+xml',
'text/json',
'text/html' ],
128 [
'text/*' => 1,
'text/html' => 1 ],
133 [
'application/rdf+xml',
'text/html' ],
134 [
'*/*' => 1,
'text/*' => 1 ],
146 $actual = $negotiator->getBestSupportedKey( $accepted, $default );
148 $this->assertEquals( $expected, $actual );