/** * @runInSeparateProcess */ function testDelete() { $_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['SCRIPT_NAME'] = '/index.php'; $_SERVER['REQUEST_URI'] = '/hello'; $this->assertNotTrue(Route::delete('/hello', function () { return new Response(); })); $_SERVER['REQUEST_METHOD'] = 'DELETE'; $this->assertTrue(Route::delete('/hello', function () { return new Response(); })); }