mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°931: Rename Tag columns in database
This commit is contained in:
@@ -226,13 +226,13 @@ class ItopDataTestCase extends ItopTestCase
|
||||
{
|
||||
$sTagClass = TagSetFieldData::GetTagDataClassName($sClass, $sAttCode);
|
||||
$oTagData = $this->createObject($sTagClass, array(
|
||||
'tag_code' => $sTagCode,
|
||||
'tag_label' => $sTagLabel,
|
||||
'tag_class' => $sClass,
|
||||
'tag_attcode' => $sAttCode,
|
||||
'tag_description' => $sTagDescription,
|
||||
'code' => $sTagCode,
|
||||
'label' => $sTagLabel,
|
||||
'obj_class' => $sClass,
|
||||
'obj_attcode' => $sAttCode,
|
||||
'description' => $sTagDescription,
|
||||
));
|
||||
$this->debug("Created {$oTagData->Get('tag_code')} ({$oTagData->Get('tag_label')})");
|
||||
$this->debug("Created {$oTagData->Get('code')} ({$oTagData->Get('label')})");
|
||||
|
||||
/** @var \TagSetFieldData $oTagData */
|
||||
return $oTagData;
|
||||
@@ -250,7 +250,7 @@ class ItopDataTestCase extends ItopTestCase
|
||||
protected function RemoveTagData($sClass, $sAttCode, $sTagCode)
|
||||
{
|
||||
$sTagClass = TagSetFieldData::GetTagDataClassName($sClass, $sAttCode);
|
||||
$this->RemoveObjects($sTagClass, "SELECT $sTagClass WHERE tag_code = '$sTagCode'");
|
||||
$this->RemoveObjects($sTagClass, "SELECT $sTagClass WHERE code = '$sTagCode'");
|
||||
}
|
||||
|
||||
private function RemoveObjects($sClass, $sOQL)
|
||||
|
||||
@@ -131,13 +131,13 @@ class TagSetFieldDataTest extends ItopDataTestCase
|
||||
{
|
||||
$sTagClass = TagSetFieldData::GetTagDataClassName(TAG_CLASS, TAG_ATTCODE);
|
||||
$oTagData = $this->createObject($sTagClass, array(
|
||||
'tag_code' => 'tag1',
|
||||
'tag_label' => 'First',
|
||||
'code' => 'tag1',
|
||||
'label' => 'First',
|
||||
));
|
||||
$this->debug("Created {$oTagData->Get('tag_class')}::{$oTagData->Get('tag_attcode')}");
|
||||
$this->debug("Created {$oTagData->Get('obj_class')}::{$oTagData->Get('obj_attcode')}");
|
||||
|
||||
static::assertEquals(TAG_CLASS, $oTagData->Get('tag_class'));
|
||||
static::assertEquals(TAG_ATTCODE, $oTagData->Get('tag_attcode'));
|
||||
static::assertEquals(TAG_CLASS, $oTagData->Get('obj_class'));
|
||||
static::assertEquals(TAG_ATTCODE, $oTagData->Get('obj_attcode'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,7 +193,7 @@ class TagSetFieldDataTest extends ItopDataTestCase
|
||||
public function testUpdateCode()
|
||||
{
|
||||
$oTagData = $this->CreateTagData(TAG_CLASS, TAG_ATTCODE, 'tag1', 'First');
|
||||
$oTagData->Set('tag_code', 'tag2');
|
||||
$oTagData->Set('code', 'tag2');
|
||||
$oTagData->DBWrite();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class ormTagSetTest extends ItopDataTestCase
|
||||
public function testGetTagDataClass()
|
||||
{
|
||||
$oTagSet = new ormTagSet(TAG_CLASS, TAG_ATTCODE, MAX_TAGS);
|
||||
static::assertEquals($oTagSet->GetTagDataClass(), 'TagSetFieldDataFor_Ticket_tagfield');
|
||||
static::assertEquals($oTagSet->GetTagDataClass(), 'TagSetFieldDataFor_Ticket__tagfield');
|
||||
}
|
||||
|
||||
public function testGetValue()
|
||||
|
||||
Reference in New Issue
Block a user