private function check_request_method($value)
 {
     switch (strtolower($value)) {
         case 'ajax':
             return Request::is_ajax();
         case 'post':
             return Request::is_post();
         case 'get':
             return Request::is_get();
         default:
             return false;
     }
 }
Example #2
0
 /**
  * @covers common\classes\Request::is_post
  */
 public function test_is_post()
 {
     $_SERVER['REQUEST_METHOD'] = 'post';
     self::assertTrue(Request::is_post());
 }