Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public function getUser($id)
*/
public function deleteGroup(XoopsGroup $group)
{
$this->groupHandler->delete($group);
$ret = $this->groupHandler->delete($group);
$this->membershipHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid')));
return true;
return $ret;
}

/**
Expand All @@ -144,9 +144,9 @@ public function deleteGroup(XoopsGroup $group)
*/
public function deleteUser(XoopsUser $user)
{
$this->userHandler->delete($user);
$ret = $this->userHandler->delete($user);
$this->membershipHandler->deleteAll(new Criteria('uid', $user->getVar('uid')));
return true;
return $ret;
}

/**
Expand Down
22 changes: 0 additions & 22 deletions tests/unit/_archives/init.php

This file was deleted.

95 changes: 0 additions & 95 deletions tests/unit/_archives/init_mini.php

This file was deleted.

23 changes: 23 additions & 0 deletions tests/unit/class/xoopsform/formTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

class XoopsFormInstance extends XoopsForm
{
function render() {}
}
/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormInstance';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\Form', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formbuttonTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormButtonTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormButton';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\Button', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formbuttontrayTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormButtonTrayTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormButtonTray';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\ButtonTray', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formcaptchaTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormCaptchaTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormCaptcha';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\Captcha', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formcheckboxTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormCheckBoxTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormCheckBox';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\CheckBox', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formcolorpickerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormColorPickerTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormColorPicker';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\ColorPicker', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formdatetimeTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormDateTimeTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormDateTime';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\DateTime', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formdhtmltextareaTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormDhtmlTextAreaTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormDhtmlTextArea';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\DhtmlTextArea', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formeditorTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormEditorTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormEditor';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\Editor', $instance);
}

}
23 changes: 23 additions & 0 deletions tests/unit/class/xoopsform/formelementTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

class XoopsFormElementInstance extends XoopsFormElement
{
function render() {}
}
/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormElementTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormElementInstance';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\Element', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formelementtrayTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormElementTrayTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormElementTray';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\ElementTray', $instance);
}

}
19 changes: 19 additions & 0 deletions tests/unit/class/xoopsform/formfileTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
require_once(dirname(__FILE__).'/../../init_new.php');

/**
* PHPUnit special settings :
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
class XoopsFormFileTest extends \PHPUnit_Framework_TestCase
{
protected $myClass = 'XoopsFormFile';

public function test___construct()
{
$instance = new $this->myClass();
$this->assertInstanceOf('Xoops\\Form\\File', $instance);
}

}
Loading