|
10 | 10 |
|
11 | 11 | require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); |
12 | 12 |
|
13 | | -$t = new lime_test(108); |
| 13 | +$t = new lime_test(109); |
14 | 14 |
|
15 | 15 | class myRequest extends sfWebRequest |
16 | 16 | { |
@@ -121,15 +121,16 @@ public function resetPathInfoArray() |
121 | 121 |
|
122 | 122 | $request->acceptableContentTypes = null; |
123 | 123 | $_SERVER['HTTP_ACCEPT'] = 'text/xml,application/xhtml+xml,application/xml,text/html;q=0.9,text/plain;q=0.8,*/*;q=0.5'; |
124 | | -$t->is($request->getAcceptableContentTypes(), array('text/xml', 'application/xml', 'application/xhtml+xml', 'text/html', 'text/plain', '*/*'), '->getAcceptableContentTypes() returns an array with all accepted content types'); |
| 124 | +$t->is($request->getAcceptableContentTypes(), array('text/xml', 'application/xhtml+xml', 'application/xml', 'text/html', 'text/plain', '*/*'), '->getAcceptableContentTypes() returns an array with all accepted content types'); |
125 | 125 |
|
126 | 126 | // ->splitHttpAcceptHeader() |
127 | 127 | $t->diag('->splitHttpAcceptHeader()'); |
128 | 128 |
|
129 | 129 | $t->is($request->splitHttpAcceptHeader(''), array(), '->splitHttpAcceptHeader() returns an empty array if the header is empty'); |
130 | | -$t->is($request->splitHttpAcceptHeader('a,b,c'), array('c', 'b', 'a'), '->splitHttpAcceptHeader() returns an array of values'); |
| 130 | +$t->is($request->splitHttpAcceptHeader('a,b,c'), array('a', 'b', 'c'), '->splitHttpAcceptHeader() returns an array of values'); |
131 | 131 | $t->is($request->splitHttpAcceptHeader('a,b;q=0.7,c;q=0.3'), array('a', 'b', 'c'), '->splitHttpAcceptHeader() strips the q value'); |
132 | 132 | $t->is($request->splitHttpAcceptHeader('a;q=0.1,b,c;q=0.3'), array('b', 'c', 'a'), '->splitHttpAcceptHeader() sorts values by the q value'); |
| 133 | +$t->is($request->splitHttpAcceptHeader('a;q=0.3,b,c;q=0.3'), array('b', 'a', 'c'), '->splitHttpAcceptHeader() sorts values by the q value including equal values'); |
133 | 134 | $t->is($request->splitHttpAcceptHeader('a; q=0.1, b, c; q=0.3'), array('b', 'c', 'a'), '->splitHttpAcceptHeader() trims whitespaces'); |
134 | 135 | $t->is($request->splitHttpAcceptHeader('a; q=0, b'), array('b'), '->splitHttpAcceptHeader() removes values when q = 0 (as per the RFC)'); |
135 | 136 |
|
|
0 commit comments