MessageTest
extends TestCase
in package
Table of Contents
- testAddHeaders() : mixed
- testCallbackBodyAsStream() : mixed
- testCallbackBodyAsString() : mixed
- testConstruct() : mixed
- testEmptyContentLengthHeader() : mixed
- Some clients include a content-length header, but the header is empty.
- testGetBodyWhenCallback() : mixed
- testGetEmptyBodyStream() : mixed
- testGetEmptyBodyString() : mixed
- testHasHeaders() : mixed
- testHeaders() : mixed
- testLongStreamToStringBody() : mixed
- It's possible that streams contains more data than the Content-Length.
- testMultipleHeaders() : mixed
- testSendBody() : mixed
- testSetHeaders() : mixed
- testStreamBody() : mixed
- testStringBody() : mixed
- createCallback() : Closure
Methods
testAddHeaders()
public
testAddHeaders() : mixed
Return values
mixed —testCallbackBodyAsStream()
public
testCallbackBodyAsStream() : mixed
Return values
mixed —testCallbackBodyAsString()
public
testCallbackBodyAsString() : mixed
Return values
mixed —testConstruct()
public
testConstruct() : mixed
Return values
mixed —testEmptyContentLengthHeader()
Some clients include a content-length header, but the header is empty.
public
testEmptyContentLengthHeader() : mixed
This is definitely broken behavior, but we should support it.
Return values
mixed —testGetBodyWhenCallback()
public
testGetBodyWhenCallback() : mixed
Return values
mixed —testGetEmptyBodyStream()
public
testGetEmptyBodyStream() : mixed
Return values
mixed —testGetEmptyBodyString()
public
testGetEmptyBodyString() : mixed
Return values
mixed —testHasHeaders()
public
testHasHeaders() : mixed
Return values
mixed —testHeaders()
public
testHeaders() : mixed
Return values
mixed —testLongStreamToStringBody()
It's possible that streams contains more data than the Content-Length.
public
testLongStreamToStringBody() : mixed
The request object should make sure to never emit more than Content-Length, if Content-Length is set.
This is in particular useful when responding to range requests with streams that represent files on the filesystem, as it's possible to just seek the stream to a certain point, set the content-length and let the request object do the rest.
Return values
mixed —testMultipleHeaders()
public
testMultipleHeaders() : mixed
Return values
mixed —testSendBody()
public
testSendBody() : mixed
Return values
mixed —testSetHeaders()
public
testSetHeaders() : mixed
Return values
mixed —testStreamBody()
public
testStreamBody() : mixed
Return values
mixed —testStringBody()
public
testStringBody() : mixed
Return values
mixed —createCallback()
private
createCallback(string $content) : Closure
Parameters
- $content : string
Return values
Closure —Returns a callback printing $content to php://output stream