예제 #1
0
 /**
  * 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;
 }
예제 #2
0
 /**
  * The setup method, called before each test
  */
 public function setUp()
 {
     $this->sut = Request::getInstance();
 }
예제 #3
0
 /**
  * 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);
 }