This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/contrib/downtime/test.php

23 lines
600 B
PHP
Raw Normal View History

2009-07-20 05:51:36 +00:00
<?php
class DowntimeTest extends SCoreWebTestCase {
2009-07-20 05:51:36 +00:00
function testDowntime() {
$this->log_in_as_admin();
$this->get_page("setup");
$this->setField("_config_downtime", true);
$this->setField("_config_downtime_message", "brb, unit testing");
$this->click("Save Settings");
$this->assertText("DOWNTIME MODE IS ON!");
$this->log_out();
$this->assertText("brb, unit testing");
$this->log_in_as_admin();
$this->get_page("setup");
$this->setField("_config_downtime", false);
$this->click("Save Settings");
$this->assertNoText("DOWNTIME MODE IS ON!");
$this->log_out();
}
}
?>