mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 21:29:58 +09:00
Update composer dependencies
This commit is contained in:
parent
49cc39e507
commit
cbd324c35b
428 changed files with 17862 additions and 5885 deletions
29
vendor/rmccue/requests/tests/ChunkedEncoding.php
vendored
Executable file → Normal file
29
vendor/rmccue/requests/tests/ChunkedEncoding.php
vendored
Executable file → Normal file
|
|
@ -15,6 +15,18 @@ class RequestsTest_ChunkedDecoding extends PHPUnit_Framework_TestCase {
|
|||
"02\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n",
|
||||
"abra\ncadabra\nall we got\n"
|
||||
),
|
||||
array(
|
||||
"02;foo=bar;hello=world\r\nab\r\n04;foo=baz\r\nra\nc\r\n06;justfoo\r\nadabra\r\n0c\r\n\nall we got\n",
|
||||
"abra\ncadabra\nall we got\n"
|
||||
),
|
||||
array(
|
||||
"02;foo=\"quoted value\"\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n",
|
||||
"abra\ncadabra\nall we got\n"
|
||||
),
|
||||
array(
|
||||
"02;foo-bar=baz\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n",
|
||||
"abra\ncadabra\nall we got\n"
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -34,12 +46,24 @@ class RequestsTest_ChunkedDecoding extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals($expected, $response->body);
|
||||
}
|
||||
|
||||
public static function notChunkedProvider() {
|
||||
return array(
|
||||
'invalid chunk size' => array( 'Hello! This is a non-chunked response!' ),
|
||||
'invalid chunk extension' => array( '1BNot chunked\r\nLooks chunked but it is not\r\n' ),
|
||||
'unquoted chunk-ext-val with space' => array( "02;foo=unquoted with space\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ),
|
||||
'unquoted chunk-ext-val with forbidden character' => array( "02;foo={unquoted}\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ),
|
||||
'invalid chunk-ext-name' => array( "02;{foo}=bar\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ),
|
||||
'incomplete quote for chunk-ext-value' => array( "02;foo=\"no end quote\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Response says it's chunked, but actually isn't
|
||||
* @dataProvider notChunkedProvider
|
||||
*/
|
||||
public function testNotActuallyChunked() {
|
||||
public function testNotActuallyChunked($body) {
|
||||
$transport = new MockTransport();
|
||||
$transport->body = 'Hello! This is a non-chunked response!';
|
||||
$transport->body = $body;
|
||||
$transport->chunked = true;
|
||||
|
||||
$options = array(
|
||||
|
|
@ -50,6 +74,7 @@ class RequestsTest_ChunkedDecoding extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals($transport->body, $response->body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Response says it's chunked and starts looking like it is, but turns out
|
||||
* that they're lying to us
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue