diff --git a/tests/php/Security/SecurityTest.php b/tests/php/Security/SecurityTest.php index 6523816776a..49e9a51e5ad 100644 --- a/tests/php/Security/SecurityTest.php +++ b/tests/php/Security/SecurityTest.php @@ -724,7 +724,9 @@ public function testGetResponseController() $result = $method->invoke($security, 'Page'); // Ensure page shares the same controller as security - $this->assertInstanceOf(PageController::class, $result); + $securityClass = Config::inst()->get(Security::class, 'page_class'); + $securityPage = new $securityClass(); + $this->assertInstanceOf($securityPage->getControllerName(), $result); $this->assertEquals($request, $result->getRequest()); }