Пример #1
0
 /**
  * @runInSeparateProcess
  */
 function testPost()
 {
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $_SERVER['SCRIPT_NAME'] = '/index.php';
     $_SERVER['REQUEST_URI'] = '/hello';
     $this->assertNotTrue(Route::post('/hello', function () {
         return new Response();
     }));
     $_SERVER['REQUEST_METHOD'] = 'POST';
     $this->assertTrue(Route::post('/hello', function () {
         return new Response();
     }));
 }