Compare commits

..

No commits in common. "b5bea0c3434c91fabe12ae32116bc575c220e060" and "77e87875b3b43806ee87dba0f3ae3a06436edc2f" have entirely different histories.

View File

@ -38,10 +38,8 @@ class DirectorTest extends SapphireTest
// Ensure redirects enabled on all environments and global state doesn't affect the tests // Ensure redirects enabled on all environments and global state doesn't affect the tests
CanonicalURLMiddleware::singleton() CanonicalURLMiddleware::singleton()
->setForceSSL(null)
->setForceSSLDomain(null) ->setForceSSLDomain(null)
->setForceSSLPatterns([]) ->setForceSSLPatterns([])
->setForceWWW(null)
->setEnabledEnvs(true); ->setEnabledEnvs(true);
$this->expectedRedirect = null; $this->expectedRedirect = null;
} }
@ -860,10 +858,7 @@ class DirectorTest extends SapphireTest
$processor = new RequestProcessor([$filter]); $processor = new RequestProcessor([$filter]);
$middlewares = Director::singleton()->getMiddlewares(); Injector::inst()->registerService($processor, RequestProcessor::class);
$middlewares['RequestProcessorMiddleware'] = $processor;
Director::singleton()->setMiddlewares($middlewares);
$response = Director::test('some-dummy-url'); $response = Director::test('some-dummy-url');
$this->assertEquals(404, $response->getStatusCode()); $this->assertEquals(404, $response->getStatusCode());