/** * Getter for the Request instance. * * @return MvcLite\Request The Request instance. */ public function getRequest() { if (!$this->request) { $this->request = \MvcLite\Request::getInstance(); } return $this->request; }
/** * The setup method, called before each test */ public function setUp() { $this->sut = Request::getInstance(); }
/** * Tests MvcLite\Request::getContentType * * @dataProvider provideGetContentType */ public function testGetContentType($expected, $headers = []) { $sut = \MvcLite\Request::getInstance(); $sut->setHeaders($headers); $result = $sut->getContentType(); $this->assertEquals($expected, $result); }