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_get
  */
 public function test_is_get()
 {
     $_SERVER['REQUEST_METHOD'] = 'get';
     self::assertTrue(Request::is_get());
 }