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
shish c68df68195 test files for various extensions
git-svn-id: file:///home/shish/svn/shimmie2/trunk@1070 7f39781d-f577-437e-ae19-be835c7a54ca
2008-10-11 07:09:42 +00:00

36 lines
1.1 KiB
PHP

<?php
class UserPageTest extends WebTestCase {
function testUserPage() {
$this->get('http://shimmie.shishnet.org/v2/user');
$this->assertTitle("Anonymous's Page");
$this->assertNoText("Options");
$this->assertNoText("More Options");
$this->get('http://shimmie.shishnet.org/v2/user/Shish');
$this->assertTitle("Shish's Page");
$this->get('http://shimmie.shishnet.org/v2/user/MauMau');
$this->assertTitle("No Such User");
$this->assertText("Login");
$this->setField('user', USER_NAME);
$this->setField('pass', USER_PASS);
$this->click("Log In");
// should be on the user page
$this->assertTitle("test's Page");
$this->assertText("Options");
$this->assertNoText("More Options");
$this->click('Log Out');
$this->assertText("Login");
$this->setField('user', ADMIN_NAME);
$this->setField('pass', ADMIN_PASS);
$this->click("Log In");
// should be on the user page
$this->assertTitle(ADMIN_NAME+"'s Page");
$this->assertText("Options");
$this->assertText("More Options");
$this->click('Log Out');
}
}
?>