mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Compare commits
1 Commits
class_extr
...
saas-1.0.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb40968e34 |
@@ -414,6 +414,20 @@ class ItopDataTestCase extends ItopTestCase
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function CreateUser($sLogin, $iProfileId, $sPassword=null, $iContactid=2)
|
protected function CreateUser($sLogin, $iProfileId, $sPassword=null, $iContactid=2)
|
||||||
|
{
|
||||||
|
$oUser = $this->CreateContactlessUser($sLogin, $iProfileId, $sPassword);
|
||||||
|
$oUser->Set('contactid', $iContactid);
|
||||||
|
return $oUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $sLogin
|
||||||
|
* @param int $iProfileId
|
||||||
|
*
|
||||||
|
* @return \DBObject
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
protected function CreateContactlessUser($sLogin, $iProfileId, $sPassword=null)
|
||||||
{
|
{
|
||||||
if (empty($sPassword)){
|
if (empty($sPassword)){
|
||||||
$sPassword = $sLogin;
|
$sPassword = $sLogin;
|
||||||
@@ -424,7 +438,6 @@ class ItopDataTestCase extends ItopTestCase
|
|||||||
$oUserProfile->Set('reason', 'UNIT Tests');
|
$oUserProfile->Set('reason', 'UNIT Tests');
|
||||||
$oSet = DBObjectSet::FromObject($oUserProfile);
|
$oSet = DBObjectSet::FromObject($oUserProfile);
|
||||||
$oUser = $this->createObject('UserLocal', array(
|
$oUser = $this->createObject('UserLocal', array(
|
||||||
'contactid' => $iContactid,
|
|
||||||
'login' => $sLogin,
|
'login' => $sLogin,
|
||||||
'password' => $sPassword,
|
'password' => $sPassword,
|
||||||
'language' => 'EN US',
|
'language' => 'EN US',
|
||||||
|
|||||||
Reference in New Issue
Block a user