From 41d1b2a88253e0ce8be2d4bffc0dd6eb2fe55788 Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Sat, 16 Sep 2017 11:27:16 +1200 Subject: [PATCH] Test fix: Don't hard code the security page_class controller --- tests/php/Security/SecurityTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/php/Security/SecurityTest.php b/tests/php/Security/SecurityTest.php index 652381677..49e9a51e5 100644 --- a/tests/php/Security/SecurityTest.php +++ b/tests/php/Security/SecurityTest.php @@ -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()); }