Test fix: Don't hard code the security page_class controller

This commit is contained in:
Mike Cochrane 2017-09-16 11:27:16 +12:00 committed by GitHub
parent 7b3286d512
commit 41d1b2a882

View File

@ -724,7 +724,9 @@ class SecurityTest extends FunctionalTest
$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());
}