These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @mixin PHPUnit_Framework_TestCase |
||
5 | */ |
||
6 | class DevHealthControllerTest extends SapphireTest { |
||
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
7 | public function testIndexCreatesChecker() { |
||
8 | $controller = new DevHealthController(); |
||
9 | |||
10 | $request = new SS_HTTPRequest('GET', 'example.com'); |
||
11 | |||
12 | // we need to fake authenticated access as BasicAuth::requireLogin doesn't like empty |
||
13 | // permission type strings, which is what health check uses. |
||
14 | |||
15 | define('ENVCHECK_BASICAUTH_USERNAME', 'foo'); |
||
16 | define('ENVCHECK_BASICAUTH_PASSWORD', 'bar'); |
||
17 | |||
18 | $_SERVER['PHP_AUTH_USER'] = 'foo'; |
||
19 | $_SERVER['PHP_AUTH_PW'] = 'bar'; |
||
20 | |||
21 | $this->assertInstanceOf('EnvironmentChecker', $controller->index($request)); |
||
22 | } |
||
23 | } |
||
24 |