public function Maintenance200Test::testStatusCodeHomePageMaintenance503 in Maintenance 200 8
Site in maintenance mode, maintenance200 disabled.
Make sure status code is 503 when maintenance mode is on and module status is disabled.
File
- tests/
src/ Functional/ Maintenance200Test.php, line 75
Class
- Maintenance200Test
- Test maintenance 200.
Namespace
Drupal\Tests\maintenance200\FunctionalCode
public function testStatusCodeHomePageMaintenance503() {
\Drupal::state()
->set('system.maintenance_mode', TRUE);
$this
->config('maintenance200.settings')
->set('maintenance200_enabled', 0)
->set('maintenance200_status_code', 418)
->save();
$this
->drupalGet('<front>');
$this
->assertResponse(503);
}