mirror of
https://github.com/e107inc/e107.git
synced 2025-06-04 01:45:15 +02:00
Merge pull request #20 from SimSync/user_class
Added tests for ucAdd and ucRemove
This commit is contained in:
commit
c484cad8d3
@ -62,7 +62,15 @@
|
|||||||
*/
|
*/
|
||||||
public function testUcAdd()
|
public function testUcAdd()
|
||||||
{
|
{
|
||||||
|
$expected = '1,4,6,9,247';
|
||||||
|
$actual = $this->uc->ucAdd(e_UC_NEWUSER, '1,4,6,9');
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $actual, 'ucAdd returned a wrong result');
|
||||||
|
|
||||||
|
$expected = array(1, 4, 6, 9, 247);
|
||||||
|
$actual = $this->uc->ucAdd(e_UC_NEWUSER, '1,4,6,9', true);
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $actual, 'ucAdd returned a wrong result');
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
public function testUc_get_classlist()
|
public function testUc_get_classlist()
|
||||||
@ -114,12 +122,20 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public function testUcRemove()
|
public function testUcRemove()
|
||||||
{
|
{
|
||||||
|
$expected = '1,4,6,9';
|
||||||
|
$actual = $this->uc->ucRemove(e_UC_NEWUSER, '1,4,6,9,247');
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $actual, 'ucRemove return a wrong result');
|
||||||
|
|
||||||
|
$expected = array(1, 4, 6, 9);
|
||||||
|
$actual = $this->uc->ucRemove(e_UC_NEWUSER, '1,4,6,9,247', true);
|
||||||
|
|
||||||
|
$this->assertEquals($expected, $actual, 'ucRemove returned a wrong result');
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
public function testReadTree()
|
public function testReadTree()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user