Reduce the utilization of superglobals in tests.