more tests, and make link to image work better

This commit is contained in:
Shish
2009-07-19 19:35:46 +01:00
parent 099b70bcad
commit fd5242d1ad
11 changed files with 150 additions and 147 deletions

View File

@ -15,13 +15,17 @@ define('USER_PASS', "test");
define('ADMIN_NAME', "demo");
define('ADMIN_PASS', "demo");
class ShimmieWebTestCase extends WebTestCase {
class SCoreWebTestCase extends WebTestCase {
protected function get_page($page) {
$url = "http://".$_SERVER["HTTP_HOST"].get_base_href().'/'.make_link($page);
$url = str_replace("/./", "/", $url);
$this->get($url);
$this->assertNoText(".php on line");
$this->assertNoText("Exception:");
$this->assertNoText("Error:");
$this->assertNoText("Warning:");
$this->assertNoText("Notice:");
}
protected function log_in_as_user() {
$this->get_page('post/list');
$this->assertText("Login");
@ -42,7 +46,9 @@ class ShimmieWebTestCase extends WebTestCase {
$this->get_page('post/list');
$this->click('Log Out');
}
}
class ShimmieWebTestCase extends SCoreWebTestCase {
protected function post_image($filename, $tags) {
$image_id = -1;
$this->setMaximumRedirects(0);