Merge pull request #7380 from mikenz/patch-13

Test fix: Don't hard code the security page_class controller
This commit is contained in:
Daniel Hensby 2017-09-17 00:08:17 +01:00 committed by GitHub
commit 0aabcac747

View File

@ -724,7 +724,9 @@ class SecurityTest extends FunctionalTest
$result = $method->invoke($security, 'Page'); $result = $method->invoke($security, 'Page');
// Ensure page shares the same controller as security // 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()); $this->assertEquals($request, $result->getRequest());
} }