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/ext/downtime/test.php

24 lines
637 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");
2009-08-19 00:28:48 +00:00
$this->set_field("_config_downtime", true);
$this->set_field("_config_downtime_message", "brb, unit testing");
2009-07-20 05:51:36 +00:00
$this->click("Save Settings");
2009-08-19 00:28:48 +00:00
$this->assert_text("DOWNTIME MODE IS ON!");
2009-07-20 05:51:36 +00:00
$this->log_out();
2009-09-19 22:03:47 +00:00
$this->get_page("post/list");
2009-08-19 00:28:48 +00:00
$this->assert_text("brb, unit testing");
2009-07-20 05:51:36 +00:00
$this->log_in_as_admin();
$this->get_page("setup");
2009-08-19 00:28:48 +00:00
$this->set_field("_config_downtime", false);
2009-07-20 05:51:36 +00:00
$this->click("Save Settings");
2009-08-19 00:28:48 +00:00
$this->assert_no_text("DOWNTIME MODE IS ON!");
2009-07-20 05:51:36 +00:00
$this->log_out();
}
}