mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
N°962: TagSet Attribute definition and values (with unit tests on values)
SVN:b931[6024]
This commit is contained in:
committed by
Pierre Goiffon
parent
157193c831
commit
9631021f84
@@ -171,7 +171,35 @@ class ItopDataTestCase extends ItopTestCase
|
||||
return $oTicket;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Create a Ticket in database
|
||||
*
|
||||
* @param string $sClass
|
||||
* @param string $sAttCode
|
||||
* @param string $sTagCode
|
||||
* @param string $sTagLabel
|
||||
* @param string $sTagDescription
|
||||
*
|
||||
* @return \TagSetFieldData
|
||||
* @throws \CoreException
|
||||
*/
|
||||
protected function CreateTagData($sClass, $sAttCode, $sTagCode, $sTagLabel, $sTagDescription = '')
|
||||
{
|
||||
$sTagClass = MetaModel::GetTagDataClass($sClass, $sAttCode);
|
||||
$oTagData = self::createObject($sTagClass, array(
|
||||
'tag_code' => $sTagCode,
|
||||
'tag_label' => $sTagLabel,
|
||||
'tag_class' => $sClass,
|
||||
'tag_attcode' => $sAttCode,
|
||||
'tag_description' => $sTagDescription,
|
||||
));
|
||||
$this->debug("\nCreated {$oTagData->Get('tag_code')} ({$oTagData->Get('tag_label')})");
|
||||
|
||||
/** @var \TagSetFieldData $oTagData */
|
||||
return $oTagData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a UserRequest in database
|
||||
*
|
||||
* @param int $iNum
|
||||
|
||||
Reference in New Issue
Block a user