From 1225ee1e788c70d3979c06ddbcd1a7a9906f5b4a Mon Sep 17 00:00:00 2001 From: v-dumas Date: Fri, 3 Jan 2025 17:18:24 +0100 Subject: [PATCH] :white_check_mark: improve test --- .../unitary-tests/application/MenuNodeTest.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/php-unit-tests/unitary-tests/application/MenuNodeTest.php b/tests/php-unit-tests/unitary-tests/application/MenuNodeTest.php index 4c9961ece..053fef232 100644 --- a/tests/php-unit-tests/unitary-tests/application/MenuNodeTest.php +++ b/tests/php-unit-tests/unitary-tests/application/MenuNodeTest.php @@ -20,16 +20,6 @@ class MenuNodeTest extends ItopDataTestCase { $this->oUR = $this->CreateUserRequest(666, $aUserRequestCustomParams); } - private function StartStopwatchInThePast(\UserRequest $oTicket, string $sAttCode, int $iSecDelay) - { - $iStartDate = time() - $iSecDelay; - /** @var \ormStopWatch $oStopwatch */ - $oStopwatch = $oTicket->Get($sAttCode); - $oAttDef = \MetaModel::GetAttributeDef(get_class($oTicket), $sAttCode); - $oStopwatch->Start($oTicket, $oAttDef, $iStartDate); - $oStopwatch->ComputeDeadlines($oTicket, $oAttDef); - $oTicket->Set($sAttCode, $oStopwatch); - } public function RenderOQLSearchProvider() { @@ -70,7 +60,7 @@ OQL; */ public function testRenderOQLSearchOqlWithDateFormatOnDeadline() { - $this->StartStopwatchInThePast($this->oUR, 'ttr', 10); + static::StartStopwatchInThePast($this->oUR, 'ttr', 10); $sOql = <<