2008-10-18 06:40:12 +00:00
|
|
|
<?php
|
2019-05-28 17:59:38 +01:00
|
|
|
class SetupTest extends ShimmiePHPUnitTestCase
|
|
|
|
{
|
|
|
|
public function testNiceUrlsTest()
|
|
|
|
{
|
|
|
|
# XXX: this only checks that the text is "ok", to check
|
|
|
|
# for a bug where it was coming out as "\nok"; it doesn't
|
|
|
|
# check that niceurls actually work
|
|
|
|
$this->get_page('nicetest');
|
|
|
|
$this->assert_content("ok");
|
|
|
|
$this->assert_no_content("\n");
|
|
|
|
}
|
2009-10-09 12:27:13 +01:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
public function testAuthAnon()
|
|
|
|
{
|
|
|
|
$this->get_page('setup');
|
|
|
|
$this->assert_response(403);
|
|
|
|
$this->assert_title("Permission Denied");
|
|
|
|
}
|
2015-09-20 20:44:34 +01:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
public function testAuthUser()
|
|
|
|
{
|
|
|
|
$this->log_in_as_user();
|
|
|
|
$this->get_page('setup');
|
|
|
|
$this->assert_response(403);
|
|
|
|
$this->assert_title("Permission Denied");
|
|
|
|
}
|
2008-10-18 06:40:12 +00:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
public function testAuthAdmin()
|
|
|
|
{
|
|
|
|
$this->log_in_as_admin();
|
|
|
|
$this->get_page('setup');
|
|
|
|
$this->assert_title("Shimmie Setup");
|
|
|
|
$this->assert_text("General");
|
|
|
|
}
|
2009-09-27 15:48:38 +01:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
public function testAdvanced()
|
|
|
|
{
|
|
|
|
$this->log_in_as_admin();
|
|
|
|
$this->get_page('setup/advanced');
|
|
|
|
$this->assert_title("Shimmie Setup");
|
2019-06-18 13:45:59 -05:00
|
|
|
$this->assert_text(ImageConfig::THUMB_QUALITY);
|
2019-05-28 17:59:38 +01:00
|
|
|
}
|
2008-10-18 06:40:12 +00:00
|
|
|
}
|