Updated user page tests
This commit is contained in:
parent
7cea8592ee
commit
bb891f3bd0
2 changed files with 22 additions and 4 deletions
|
@ -5,12 +5,12 @@ class UserPageTest extends ShimmiePHPUnitTestCase
|
|||
{
|
||||
$this->get_page('user');
|
||||
$this->assert_title("Not Logged In");
|
||||
$this->assert_no_text("Options");
|
||||
$this->assert_no_text("More Options");
|
||||
$this->assert_no_text("Stats");
|
||||
|
||||
$this->get_page('user/demo');
|
||||
$this->assert_title("demo's Page");
|
||||
$this->assert_text("Joined:");
|
||||
$this->assert_no_text("Operations");
|
||||
|
||||
$this->get_page('user/MauMau');
|
||||
$this->assert_title("No Such User");
|
||||
|
@ -19,7 +19,7 @@ class UserPageTest extends ShimmiePHPUnitTestCase
|
|||
// should be on the user page
|
||||
$this->get_page('user/test');
|
||||
$this->assert_title("test's Page");
|
||||
$this->assert_text("Options");
|
||||
$this->assert_text("Operations");
|
||||
// FIXME: check class
|
||||
//$this->assert_no_text("Admin:");
|
||||
$this->log_out();
|
||||
|
@ -28,7 +28,7 @@ class UserPageTest extends ShimmiePHPUnitTestCase
|
|||
// should be on the user page
|
||||
$this->get_page('user/demo');
|
||||
$this->assert_title("demo's Page");
|
||||
$this->assert_text("Options");
|
||||
$this->assert_text("Operations");
|
||||
// FIXME: check class
|
||||
//$this->assert_text("Admin:");
|
||||
$this->log_out();
|
||||
|
|
18
ext/user_config/test.php
Normal file
18
ext/user_config/test.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php declare(strict_types=1);
|
||||
class UserConfigTest extends ShimmiePHPUnitTestCase
|
||||
{
|
||||
private const OPTIONS_BLOCK_TITLE = "User Options";
|
||||
|
||||
public function testUserConfigPage()
|
||||
{
|
||||
$this->get_page('user_config');
|
||||
$this->assert_title("Permission Denied");
|
||||
$this->assert_no_text(self::OPTIONS_BLOCK_TITLE);
|
||||
|
||||
$this->log_in_as_user();
|
||||
$this->get_page('user_config');
|
||||
$this->assert_title(self::OPTIONS_BLOCK_TITLE);
|
||||
$this->log_out();
|
||||
|
||||
}
|
||||
}
|
Reference in a new issue