N°7484 - UserRequest/Incident solution field supports HTML

This commit is contained in:
vdumas
2024-05-15 10:37:13 +02:00
parent 1366acd001
commit d2c7b13454
3 changed files with 10 additions and 10 deletions

View File

@@ -222,9 +222,9 @@ class TransactionsTest extends ItopTestCase
// Reload from db after the update to check the value present in the database
$oTicket = MetaModel::GetObject('UserRequest', $oTicket->GetKey());
if ($bIsModified) {
$this->assertEquals('Create OK', $oTicket->Get('solution'));
$this->assertEquals('<p>Create OK</p>', $oTicket->Get('solution'));
} else {
$this->assertEquals('Test OK', $oTicket->Get('solution'));
$this->assertEquals('<p>Test OK</p>', $oTicket->Get('solution'));
}
if (!$oTicket->IsNew()) {

View File

@@ -583,7 +583,7 @@ class CRUDEventTest extends ItopDataTestCase
$oLnk = MetaModel::NewObject(lnkPersonToTeam::class, ['person_id' => $oPerson->GetKey(), 'team_id' => $oTeam->GetKey()]);
$oLnk->DBInsert();
$this->assertArrayNotHasKey(EVENT_DB_LINKS_CHANGED, self::$aEventCalls, 'no relation with the with_php_compute attribute !');
$this->assertArrayNotHasKey(EVENT_DB_LINKS_CHANGED, self::$aEventCalls, 'no relation with the with_php_computation attribute !');
}
public function testLinksDeleted()

View File

@@ -1325,13 +1325,13 @@ class DBObjectTest extends ItopDataTestCase
'title 256 chars' => ['title', 256],
'title 300 chars' => ['title', 300],
// UserRequest.solution is an AttributeText (maxsize=65535) with format=text
'solution 250 chars' => ['solution', 250],
'solution 60000 chars' => ['solution', 60000],
'solution 65534 chars' => ['solution', 65534],
'solution 65535 chars' => ['solution', 65535],
'solution 65536 chars' => ['solution', 65536],
'solution 70000 chars' => ['solution', 70000],
// UserRequest.pending_reason is an AttributeText (maxsize=65535) with format=text
'pending_reason 250 chars' => ['pending_reason', 250],
'pending_reason 60000 chars' => ['pending_reason', 60000],
'pending_reason 65534 chars' => ['pending_reason', 65534],
'pending_reason 65535 chars' => ['pending_reason', 65535],
'pending_reason 65536 chars' => ['pending_reason', 65536],
'pending_reason 70000 chars' => ['pending_reason', 70000],
];
}