Skip to content

Commit

Permalink
Test fix: Don't hard code the security page_class controller
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenz committed Sep 15, 2017
1 parent 7b3286d commit 41d1b2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/php/Security/SecurityTest.php
Expand Up @@ -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());
}

Expand Down

0 comments on commit 41d1b2a

Please sign in to comment.