MvcLite\Request::setHeaders
Method to set the headers.
Signature
public function setHeaders([array
$headers = ] )
Parameters
$headers
—
array
Returns
- Request
- Returns $this, for object-chaining.
Test Coverage
Information
- Coverage: 16/16 Lines (100%)
- Tests: 8
- Passed: 8 (100%)
Tests
- [ PASSED ] — MvcLite\DispatcherTest::testDispatch with data set "good controller request"
- [ PASSED ] — MvcLite\DispatcherTest::testDispatch with data set "bad controller request"
- [ PASSED ] — MvcLite\RequestTest::testSetHeaders with data set "no http headers"
- [ PASSED ] — MvcLite\RequestTest::testSetHeaders with data set "one http headers"
- [ PASSED ] — MvcLite\RequestTest::testSetHeaders with data set "with content type"
- [ PASSED ] — MvcLite\RequestTest::testGetContentType with data set "has content type text/plain"
- [ PASSED ] — MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
- [ PASSED ] — MvcLite\RequestTest::testGetContentType with data set "has nothing"