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

39 lines
954 B
PHP
Raw Normal View History

<?php
class UserPageTest extends SCoreWebTestCase {
function testUserPage() {
$this->get_page('user');
2009-08-19 00:28:48 +00:00
$this->assert_title("Not Logged In");
$this->assert_no_text("Options");
$this->assert_no_text("More Options");
$this->get_page('user/demo');
2009-08-19 00:28:48 +00:00
$this->assert_title("demo's Page");
$this->assert_text("Join date:");
$this->get_page('user/MauMau');
2009-08-19 00:28:48 +00:00
$this->assert_title("No Such User");
$this->log_in_as_user();
// should be on the user page
2009-08-19 00:28:48 +00:00
$this->assert_title(USER_NAME+"'s Page");
$this->assert_text("Options");
$this->assert_no_text("Admin:");
$this->log_out();
$this->log_in_as_admin();
// should be on the user page
2009-08-19 00:28:48 +00:00
$this->assert_title(ADMIN_NAME+"'s Page");
$this->assert_text("Options");
$this->assert_text("Admin:");
$this->log_out();
2009-07-20 05:51:36 +00:00
# FIXME: test user creation
# FIXME: test adminifying
# FIXME: test password reset
2009-09-20 02:48:24 +00:00
2009-10-26 10:49:07 +00:00
$this->get_page('user_admin/list');
2009-09-20 02:48:24 +00:00
$this->assert_text("demo");
}
}
?>