git-svn-id: file:///home/shish/svn/shimmie2/trunk@1070 7f39781d-f577-437e-ae19-be835c7a54ca
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 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');
 | |
| 	}
 | |
| }
 | |
| ?>
 |