mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 18:11:47 +02:00
[ticket/10975] Some quick tests to check the memberlist behaviour
Checks behaviour when adding and deleting a user. PHPBB3-10975
This commit is contained in:
33
tests/functional/memberlist_test.php
Normal file
33
tests/functional/memberlist_test.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package testing
|
||||||
|
* @copyright (c) 2012 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group functional
|
||||||
|
*/
|
||||||
|
class phpbb_functional_memberlist_test extends phpbb_functional_test_case
|
||||||
|
{
|
||||||
|
public function test_create_user()
|
||||||
|
{
|
||||||
|
$this->create_user('user');
|
||||||
|
$this->login();
|
||||||
|
$crawler = $this->request('GET', 'memberlist.php?sid=' . $this->sid);
|
||||||
|
$this->assertContains('user', $crawler->filter('#memberlist tr')->eq(1)->text());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends test_create_user
|
||||||
|
*/
|
||||||
|
public function test_delete_user()
|
||||||
|
{
|
||||||
|
$this->delete_user('user');
|
||||||
|
$this->login();
|
||||||
|
$crawler = $this->request('GET', 'memberlist.php?sid=' . $this->sid);
|
||||||
|
$this->assertEquals(2, $crawler->filter('#memberlist tr')->count());
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user