N°8692 - Notification - placeholder attributesubitem

This commit is contained in:
Anne-Cath
2025-11-10 16:14:43 +01:00
parent fc967c06ce
commit 058e0b2b8a
2 changed files with 23 additions and 4 deletions

View File

@@ -340,4 +340,20 @@ PHP
return $oAttribute;
}
public function testDisplayStopwatch()
{
$aUserRequestCustomParams = [
'title' => "Test DisplayStopwatch",
];
$oUserRequest = $this->CreateUserRequest(456, $aUserRequestCustomParams);
$oAttDef = MetaModel::GetAttributeDef(get_class($oUserRequest), 'ttr_escalation_deadline');
$iStartDate = time() - 200;
$oStopwatch = $oUserRequest->Get('ttr');
$oStopwatch->DefineThreshold(100, $iStartDate);
$oUserRequest->Set('ttr', $oStopwatch);
$value = $oUserRequest->Get('ttr_escalation_deadline');
$sRet = $oAttDef->GetAsPlainText($value, $oUserRequest);
self::assertEquals('Missed by 3 min', $sRet);
}
}