From c81b832d049cb35360b38a0c9445e36a8daf7d4c Mon Sep 17 00:00:00 2001 From: bernhard Date: Thu, 5 Nov 2020 10:06:41 +0100 Subject: [PATCH] Issue #616: adapt the FixedTimeSet() calls --- scripts/test/ACL/DB/ACL.t | 2 +- scripts/test/AuthSession.t | 2 +- scripts/test/Cache.t | 2 +- scripts/test/CommunicationLog.t | 2 +- scripts/test/CommunicationLog/DB.t | 2 +- .../test/Console/Command/Admin/Article/StorageSwitch.t | 2 +- scripts/test/Console/Command/Maint/FormDraft/Delete.t | 6 +++--- scripts/test/Console/Command/Maint/GenericAgent/Run.t | 2 +- scripts/test/Console/Command/Maint/Log/CommunicationLog.t | 4 ++-- .../Console/Command/Maint/Ticket/InvalidUserCleanup.t | 4 ++-- scripts/test/Console/Command/Maint/Ticket/PendingCheck.t | 4 ++-- .../test/Console/Command/Maint/WebUploadCache/Cleanup.t | 2 +- .../test/Daemon/DaemonModules/SchedulerCronTaskManager.t | 2 +- .../DaemonModules/SchedulerGenericAgentTaskManager.t | 2 +- .../DaemonModules/SchedulerTaskWorker/GenericAgent.t | 2 +- .../DaemonModules/SchedulerTaskWorker/GenericInterface.t | 2 +- scripts/test/Daemon/SchedulerDB.t | 2 +- scripts/test/Daemon/SchedulerDB/CronTaskToExecute.t | 2 +- scripts/test/Daemon/SchedulerDBFutureTask.t | 2 +- scripts/test/Daemon/SchedulerDBRecurrentTask.t | 2 +- scripts/test/DynamicField/EditFieldRender.t | 2 +- scripts/test/DynamicField/SearchFieldParameterBuild.t | 2 +- scripts/test/DynamicField/SearchFieldRender.t | 2 +- scripts/test/Email/Bounce.t | 2 +- scripts/test/Event/Escalations.t | 4 ++-- scripts/test/GenericAgent.t | 4 ++-- .../test/GenericInterface/Debugger/DebugLog/LogCleanup.t | 2 +- .../test/GenericInterface/ErrorHandling/RequestRetry.t | 2 +- .../GenericInterface/Event/ObjectType/Ticket/DataGet.t | 2 +- .../test/GenericInterface/Operation/Session/SessionGet.t | 2 +- .../test/GenericInterface/Operation/Ticket/TicketUpdate.t | 2 +- scripts/test/GoogleAuthenticator.t | 4 ++-- scripts/test/Language/Time.t | 2 +- scripts/test/Layout/BuildDateSelection.t | 2 +- scripts/test/Layout/Template/Render.t | 4 ++-- scripts/test/PID.t | 2 +- scripts/test/PostMaster/FollowUp.t | 2 +- scripts/test/PostMaster/FollowUpArticleVisibilityCheck.t | 2 +- scripts/test/PostMaster/FollowUpCheck/Attachments.t | 2 +- scripts/test/PostMaster/FollowUpCheck/References.t | 2 +- scripts/test/PostMaster/PendingTime.t | 2 +- scripts/test/ProcessManagement/DB/Activity.t | 2 +- scripts/test/ProcessManagement/DB/ActivityDialog.t | 2 +- scripts/test/ProcessManagement/DB/Process.t | 2 +- scripts/test/ProcessManagement/DB/Transition.t | 2 +- scripts/test/ProcessManagement/DB/TransitionAction.t | 2 +- .../ProcessManagement/TransitionAction/TicketStateSet.t | 2 +- scripts/test/Selenium/Agent/Admin/TicketAppointments.t | 2 +- scripts/test/Selenium/Agent/AgentTicketQueue.t | 2 +- scripts/test/Selenium/Agent/AgentTicketSearch.t | 2 +- scripts/test/Selenium/Output/Dashboard/TicketGeneric.t | 2 +- scripts/test/Stats/Dynamic/TicketAccountedTimeResult.t | 4 ++-- scripts/test/Stats/Dynamic/TicketClosedCreatedInQueue.t | 2 +- .../test/Stats/Dynamic/TicketSolutionResponseTimeResult.t | 4 ++-- scripts/test/Stats/Result.t | 4 ++-- .../test/Stats/TicketSolutionResponseTimeGetStatElement.t | 2 +- .../SysConfig/ConfigurationDeploymentSettingListGet.t | 2 +- scripts/test/SysConfig/ConfigurationInvalidList.t | 2 +- scripts/test/SysConfig/ConfigurationListGet.t | 2 +- scripts/test/SysConfig/DB/Deployment.t | 2 +- scripts/test/SysConfig/DB/DeploymentListCleanup.t | 2 +- scripts/test/SysConfig/DB/DeploymentModifiedVersionList.t | 2 +- scripts/test/SysConfig/DB/SettingLock.t | 2 +- scripts/test/SysConfig/EffectiveValues2PerlFile.t | 2 +- .../SysConfig/OTOBOCommunity/DeploymentRestoreAdvanced.t | 2 +- scripts/test/SysConfig/SettingEffectiveValueCheck.t | 2 +- scripts/test/SystemMaintenance.t | 2 +- scripts/test/TemplateGenerator/AutoResponse.t | 2 +- .../test/TemplateGenerator/NotificationEventAddTimezone.t | 2 +- scripts/test/TemplateGenerator/Replace.t | 2 +- scripts/test/TemplateGenerator/Template.t | 2 +- scripts/test/Ticket.t | 2 +- scripts/test/Ticket/Article/Backend/Invalid.t | 2 +- scripts/test/Ticket/Article/Backend/MIMEBase.t | 2 +- scripts/test/Ticket/Article/Backend/TransmissionLog.t | 2 +- .../test/Ticket/Event/NotificationEvent/Transport/Email.t | 6 +++--- .../NotificationEvent/Transport/EmailSignedCryptedSMIME.t | 2 +- scripts/test/Ticket/MetaArticle.t | 2 +- scripts/test/Ticket/Number/Base.t | 2 +- scripts/test/Ticket/Number/Date.t | 2 +- scripts/test/Ticket/Number/DateChecksum.t | 2 +- scripts/test/Ticket/TicketCreateAfterGet.t | 2 +- scripts/test/Ticket/TicketMerge.t | 2 +- scripts/test/Ticket/TicketSearch/PendingUntilTime.t | 2 +- scripts/test/Ticket/TicketSearch/TicketHistory.t | 2 +- .../TicketHistoryReferenceForSearchArgument.t | 2 +- scripts/test/Time/FixedTimeHelper.t | 2 +- scripts/test/Time/MailTimeStamp.t | 2 +- .../test/Znuny4OTOBOEscalationSuspend/EscalationSuspend.t | 2 +- .../Znuny4OTOBOEscalationSuspend/EscalationSuspendLoop.t | 8 ++++---- 90 files changed, 107 insertions(+), 107 deletions(-) diff --git a/scripts/test/ACL/DB/ACL.t b/scripts/test/ACL/DB/ACL.t index 9679f6d654..4c1baefc06 100644 --- a/scripts/test/ACL/DB/ACL.t +++ b/scripts/test/ACL/DB/ACL.t @@ -38,7 +38,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/AuthSession.t b/scripts/test/AuthSession.t index d43e608556..381e850bfa 100644 --- a/scripts/test/AuthSession.t +++ b/scripts/test/AuthSession.t @@ -639,7 +639,7 @@ for my $ModuleFile (@BackendModuleFiles) { ); # Added some checks for the GetActiveSessions function - $Helper->FixedTimeSet(); + FixedTimeSet(); $ConfigObject->Set( Key => 'SessionMaxIdleTime', diff --git a/scripts/test/Cache.t b/scripts/test/Cache.t index 1197e8d7c7..ecfc5f843e 100644 --- a/scripts/test/Cache.t +++ b/scripts/test/Cache.t @@ -111,7 +111,7 @@ for my $ModuleFile (@BackendModuleFiles) { # set fixed time if ( $FixedTimeCompatibleBackends{$Module} ) { - $Helper->FixedTimeSet(); + FixedTimeSet(); } my $CacheSet = $CacheObject->Set( diff --git a/scripts/test/CommunicationLog.t b/scripts/test/CommunicationLog.t index 0d8d8daef7..00d34130c9 100644 --- a/scripts/test/CommunicationLog.t +++ b/scripts/test/CommunicationLog.t @@ -192,7 +192,7 @@ my @Test = ( for my $Test (@Test) { - $Helper->FixedTimeSet(); + FixedTimeSet(); # # CommunicationLog object create diff --git a/scripts/test/CommunicationLog/DB.t b/scripts/test/CommunicationLog/DB.t index 20598b9840..fd3a3415d6 100644 --- a/scripts/test/CommunicationLog/DB.t +++ b/scripts/test/CommunicationLog/DB.t @@ -437,7 +437,7 @@ my @Test = ( for my $Test (@Test) { - $Helper->FixedTimeSet(); + FixedTimeSet(); # Create an object, representing a new communication: my $CommunicationLogObject = $Kernel::OM->Create( diff --git a/scripts/test/Console/Command/Admin/Article/StorageSwitch.t b/scripts/test/Console/Command/Admin/Article/StorageSwitch.t index f7e5d1e2b9..a376add40a 100644 --- a/scripts/test/Console/Command/Admin/Article/StorageSwitch.t +++ b/scripts/test/Console/Command/Admin/Article/StorageSwitch.t @@ -40,7 +40,7 @@ $Kernel::OM->Get('Kernel::Config')->Set( ); # create isolated time environment during test -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/Console/Command/Maint/FormDraft/Delete.t b/scripts/test/Console/Command/Maint/FormDraft/Delete.t index 085368ead0..26fb081f51 100644 --- a/scripts/test/Console/Command/Maint/FormDraft/Delete.t +++ b/scripts/test/Console/Command/Maint/FormDraft/Delete.t @@ -80,7 +80,7 @@ $Self->True( "Ticket is created - $TicketID" ); -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -113,7 +113,7 @@ for ( 1 .. 3 ) { # set fix time in order so further created drafts will be expired # to test command with expired option and without it as well - $HelperObject->FixedTimeSet( + FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -123,7 +123,7 @@ for ( 1 .. 3 ) { ); } -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/Console/Command/Maint/GenericAgent/Run.t b/scripts/test/Console/Command/Maint/GenericAgent/Run.t index 3c0ed0a7c4..82157baa50 100644 --- a/scripts/test/Console/Command/Maint/GenericAgent/Run.t +++ b/scripts/test/Console/Command/Maint/GenericAgent/Run.t @@ -68,7 +68,7 @@ my %TicketConfig = ( ); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $TicketID1 = $TicketObject->TicketCreate(%TicketConfig); $Self->IsNot( diff --git a/scripts/test/Console/Command/Maint/Log/CommunicationLog.t b/scripts/test/Console/Command/Maint/Log/CommunicationLog.t index 645fe82ddc..5bc857f05f 100644 --- a/scripts/test/Console/Command/Maint/Log/CommunicationLog.t +++ b/scripts/test/Console/Command/Maint/Log/CommunicationLog.t @@ -75,7 +75,7 @@ for my $TestCommunication (@Communications) { String => $TestCommunication->{Date} } ); - $HelperObject->FixedTimeSet($TestDateTimeObject); + FixedTimeSet($TestDateTimeObject); } my $CommunicationLogObject = $Kernel::OM->Create( @@ -240,7 +240,7 @@ for my $CommunicationToTestPurge (@CommunicationsToTestPurge) { my $TestDateTimeObject = $Kernel::OM->Create('Kernel::System::DateTime'); $TestDateTimeObject->Subtract( Hours => $CommunicationToTestPurge->{Date}->{Hours} ); - $HelperObject->FixedTimeSet($TestDateTimeObject); + FixedTimeSet($TestDateTimeObject); my $CommunicationLogObject = $Kernel::OM->Create( 'Kernel::System::CommunicationLog', diff --git a/scripts/test/Console/Command/Maint/Ticket/InvalidUserCleanup.t b/scripts/test/Console/Command/Maint/Ticket/InvalidUserCleanup.t index e22693b233..72c4371b83 100644 --- a/scripts/test/Console/Command/Maint/Ticket/InvalidUserCleanup.t +++ b/scripts/test/Console/Command/Maint/Ticket/InvalidUserCleanup.t @@ -34,7 +34,7 @@ my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # Set fixed time to create user in pst. # Then when it is set to invalid, it have been invalid for more than a month. -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -128,7 +128,7 @@ $Self->True( # Set current time in order to check InvalidUserCleanup console command. # Created test user will be invalid for more than a month. -$Helper->FixedTimeSet(); +FixedTimeSet(); my ( $UserName2, $UserID2 ) = $Helper->TestUserCreate(); my $TicketID2 = $TicketObject->TicketCreate( diff --git a/scripts/test/Console/Command/Maint/Ticket/PendingCheck.t b/scripts/test/Console/Command/Maint/Ticket/PendingCheck.t index 23d6f22fce..d9ec6c9511 100644 --- a/scripts/test/Console/Command/Maint/Ticket/PendingCheck.t +++ b/scripts/test/Console/Command/Maint/Ticket/PendingCheck.t @@ -74,7 +74,7 @@ my $SystemTime = $Kernel::OM->Create( )->ToEpoch(); # set the fixed time -$Helper->FixedTimeSet($SystemTime); +FixedTimeSet($SystemTime); my $ExitCode = $CommandObject->Execute(); @@ -103,7 +103,7 @@ $SystemTime = $Kernel::OM->Create( )->ToEpoch(); # set the fixed time -$Helper->FixedTimeSet($SystemTime); +FixedTimeSet($SystemTime); $ExitCode = $CommandObject->Execute(); diff --git a/scripts/test/Console/Command/Maint/WebUploadCache/Cleanup.t b/scripts/test/Console/Command/Maint/WebUploadCache/Cleanup.t index 2e61d470a3..49530797e2 100644 --- a/scripts/test/Console/Command/Maint/WebUploadCache/Cleanup.t +++ b/scripts/test/Console/Command/Maint/WebUploadCache/Cleanup.t @@ -116,7 +116,7 @@ for my $Module (qw(DB FS)) { ); # set fixed time - $Helper->FixedTimeSet(); + FixedTimeSet(); # wait 24h+1s to expire upload cache $Helper->FixedTimeAddSeconds(86401); diff --git a/scripts/test/Daemon/DaemonModules/SchedulerCronTaskManager.t b/scripts/test/Daemon/DaemonModules/SchedulerCronTaskManager.t index d8158e891b..785c5028f2 100644 --- a/scripts/test/Daemon/DaemonModules/SchedulerCronTaskManager.t +++ b/scripts/test/Daemon/DaemonModules/SchedulerCronTaskManager.t @@ -85,7 +85,7 @@ $ConfigObject->Set( ); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $CurSysDTObject = $Kernel::OM->Create('Kernel::System::DateTime'); diff --git a/scripts/test/Daemon/DaemonModules/SchedulerGenericAgentTaskManager.t b/scripts/test/Daemon/DaemonModules/SchedulerGenericAgentTaskManager.t index 5c8d2ca260..e15abc3d1a 100644 --- a/scripts/test/Daemon/DaemonModules/SchedulerGenericAgentTaskManager.t +++ b/scripts/test/Daemon/DaemonModules/SchedulerGenericAgentTaskManager.t @@ -74,7 +74,7 @@ my $RunTasks = sub { $RunTasks->(); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $CurSysDTObject = $Kernel::OM->Create('Kernel::System::DateTime'); my $SecsDiff = $CurSysDTObject->Get()->{Second} - 60; diff --git a/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericAgent.t b/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericAgent.t index 4f113e3a96..4c641ade49 100644 --- a/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericAgent.t +++ b/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericAgent.t @@ -134,7 +134,7 @@ $Self->True( ); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); my @Tests = ( { diff --git a/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericInterface.t b/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericInterface.t index 677f8d2c9f..41c90b77e0 100644 --- a/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericInterface.t +++ b/scripts/test/Daemon/DaemonModules/SchedulerTaskWorker/GenericInterface.t @@ -41,7 +41,7 @@ my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); my $RandomID = $Helper->GetRandomID(); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); # web service config my $WebserviceConfig = { diff --git a/scripts/test/Daemon/SchedulerDB.t b/scripts/test/Daemon/SchedulerDB.t index 2d3dc21ec1..472d7d94a3 100644 --- a/scripts/test/Daemon/SchedulerDB.t +++ b/scripts/test/Daemon/SchedulerDB.t @@ -528,7 +528,7 @@ for my $Task (@List) { # TaskCleanup() tests # freeze the current time -$Helper->FixedTimeSet(); +FixedTimeSet(); my %TaskTemplate = ( Type => 'UnitTest', diff --git a/scripts/test/Daemon/SchedulerDB/CronTaskToExecute.t b/scripts/test/Daemon/SchedulerDB/CronTaskToExecute.t index 1aa098f91e..f50f48d9c2 100644 --- a/scripts/test/Daemon/SchedulerDB/CronTaskToExecute.t +++ b/scripts/test/Daemon/SchedulerDB/CronTaskToExecute.t @@ -193,7 +193,7 @@ my @Tests = ( ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); for my $Test (@Tests) { diff --git a/scripts/test/Daemon/SchedulerDBFutureTask.t b/scripts/test/Daemon/SchedulerDBFutureTask.t index 15a001ae48..36e17d2e44 100644 --- a/scripts/test/Daemon/SchedulerDBFutureTask.t +++ b/scripts/test/Daemon/SchedulerDBFutureTask.t @@ -62,7 +62,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); # get current time stamp my $TimeStamp = $Kernel::OM->Create('Kernel::System::DateTime')->ToString(); diff --git a/scripts/test/Daemon/SchedulerDBRecurrentTask.t b/scripts/test/Daemon/SchedulerDBRecurrentTask.t index 46eb85f553..72861f5b11 100644 --- a/scripts/test/Daemon/SchedulerDBRecurrentTask.t +++ b/scripts/test/Daemon/SchedulerDBRecurrentTask.t @@ -88,7 +88,7 @@ $CacheObject->CleanUp( ); # freeze time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $SystemTimeObject = $Kernel::OM->Create('Kernel::System::DateTime'); my $SecsDiff = 60 - $SystemTimeObject->Get()->{Second}; diff --git a/scripts/test/DynamicField/EditFieldRender.t b/scripts/test/DynamicField/EditFieldRender.t index 3d07563270..0c5e3f2b62 100644 --- a/scripts/test/DynamicField/EditFieldRender.t +++ b/scripts/test/DynamicField/EditFieldRender.t @@ -34,7 +34,7 @@ my $DFBackendObject = $Kernel::OM->Get('Kernel::System::DynamicField::Backend'); my $ParamObject = $Kernel::OM->Get('Kernel::System::Web::Request'); # use a fixed year to compare the time selection results -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/DynamicField/SearchFieldParameterBuild.t b/scripts/test/DynamicField/SearchFieldParameterBuild.t index 2dfbf209f2..ddf525898c 100644 --- a/scripts/test/DynamicField/SearchFieldParameterBuild.t +++ b/scripts/test/DynamicField/SearchFieldParameterBuild.t @@ -42,7 +42,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # Use a fixed year to compare the time selection results -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/DynamicField/SearchFieldRender.t b/scripts/test/DynamicField/SearchFieldRender.t index 8c2abd0c28..63b4671286 100644 --- a/scripts/test/DynamicField/SearchFieldRender.t +++ b/scripts/test/DynamicField/SearchFieldRender.t @@ -36,7 +36,7 @@ my $DFBackendObject = $Kernel::OM->Get('Kernel::System::DynamicField::Backend'); # my $TimeObject = $Kernel::OM->Get('Kernel::System::Time'); # # use a fixed year to compare the time selection results -# $HelperObject->FixedTimeSet( +# FixedTimeSet( # $TimeObject->TimeStamp2SystemTime( String => '2013-12-12 00:00:00' ), # ); diff --git a/scripts/test/Email/Bounce.t b/scripts/test/Email/Bounce.t index 8acfa78641..eb266b9581 100644 --- a/scripts/test/Email/Bounce.t +++ b/scripts/test/Email/Bounce.t @@ -53,7 +53,7 @@ my $SystemTime = $Kernel::OM->Create( String => '2014-01-01 12:00:00', }, ); -$Helper->FixedTimeSet($SystemTime); +FixedTimeSet($SystemTime); my $EmailObject = $Kernel::OM->Get('Kernel::System::Email'); diff --git a/scripts/test/Event/Escalations.t b/scripts/test/Event/Escalations.t index cb4218a4d8..b64824a9f0 100644 --- a/scripts/test/Event/Escalations.t +++ b/scripts/test/Event/Escalations.t @@ -55,7 +55,7 @@ $ConfigObject->Set( ); # set fixed time -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -535,7 +535,7 @@ $ConfigObject->Set( ); # Set fixed time for testing. -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/GenericAgent.t b/scripts/test/GenericAgent.t index f3c85cfc49..e7a9334117 100644 --- a/scripts/test/GenericAgent.t +++ b/scripts/test/GenericAgent.t @@ -624,7 +624,7 @@ my $TestJobName = 'Job' . $Helper->GetRandomID(); my $OldPriorityID = 3; my $NewPriorityID = 1; -$Helper->FixedTimeSet(); +FixedTimeSet(); # Go 7 days to the past. $Helper->FixedTimeAddSeconds( -60 * 60 * 24 * 7 ); @@ -718,7 +718,7 @@ $Self->Is( "First job run - PriorityID is still '$OldPriorityID'", ); -$Helper->FixedTimeSet(); +FixedTimeSet(); # Continue with ticket state changes (go 4 days to the past). $Helper->FixedTimeAddSeconds( -60 * 60 * 24 * 4 ); diff --git a/scripts/test/GenericInterface/Debugger/DebugLog/LogCleanup.t b/scripts/test/GenericInterface/Debugger/DebugLog/LogCleanup.t index 302cb3303a..179b2346d3 100644 --- a/scripts/test/GenericInterface/Debugger/DebugLog/LogCleanup.t +++ b/scripts/test/GenericInterface/Debugger/DebugLog/LogCleanup.t @@ -86,7 +86,7 @@ my $SetDebugLogEntries = sub { my $Success = $DateTimeObject->Add( Days => 1, ); - $Helper->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); $Success = $DebugLogObject->LogAdd( CommunicationID => $MainObject->MD5sum( diff --git a/scripts/test/GenericInterface/ErrorHandling/RequestRetry.t b/scripts/test/GenericInterface/ErrorHandling/RequestRetry.t index 3229dcdd24..f71dc2230e 100644 --- a/scripts/test/GenericInterface/ErrorHandling/RequestRetry.t +++ b/scripts/test/GenericInterface/ErrorHandling/RequestRetry.t @@ -39,7 +39,7 @@ my $ErrorObject = $Kernel::OM->Get('Kernel::GenericInterface::ErrorHandling::Re # set fixed time my $CurrentDateTime = $Kernel::OM->Create('Kernel::System::DateTime'); my $CurrentDateTimeString = $CurrentDateTime->ToString(); -$HelperObject->FixedTimeSet($CurrentDateTime); +FixedTimeSet($CurrentDateTime); my $TimeDiff = sub { my ( $Self, $CurrentDateTime, $TimeDiff ) = @_; diff --git a/scripts/test/GenericInterface/Event/ObjectType/Ticket/DataGet.t b/scripts/test/GenericInterface/Event/ObjectType/Ticket/DataGet.t index 27e40cde1e..3f1cd65138 100644 --- a/scripts/test/GenericInterface/Event/ObjectType/Ticket/DataGet.t +++ b/scripts/test/GenericInterface/Event/ObjectType/Ticket/DataGet.t @@ -44,7 +44,7 @@ $ConfigObject->Set( ); # Set fixed time. -$Helper->FixedTimeSet(); +FixedTimeSet(); my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket'); diff --git a/scripts/test/GenericInterface/Operation/Session/SessionGet.t b/scripts/test/GenericInterface/Operation/Session/SessionGet.t index acb2c702f4..1053cd7ec6 100644 --- a/scripts/test/GenericInterface/Operation/Session/SessionGet.t +++ b/scripts/test/GenericInterface/Operation/Session/SessionGet.t @@ -213,7 +213,7 @@ $Helper->ConfigSettingChange( my $SessionObject = $Kernel::OM->Get('Kernel::System::AuthSession'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $Epoch = $Kernel::OM->Create('Kernel::System::DateTime')->ToEpoch(); diff --git a/scripts/test/GenericInterface/Operation/Ticket/TicketUpdate.t b/scripts/test/GenericInterface/Operation/Ticket/TicketUpdate.t index 077bfff2fa..27af8b661b 100644 --- a/scripts/test/GenericInterface/Operation/Ticket/TicketUpdate.t +++ b/scripts/test/GenericInterface/Operation/Ticket/TicketUpdate.t @@ -917,7 +917,7 @@ $Self->Is( 'DebuggerObject instantiate correctly', ); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $ArticleObject = $Kernel::OM->Get('Kernel::System::Ticket::Article'); diff --git a/scripts/test/GoogleAuthenticator.t b/scripts/test/GoogleAuthenticator.t index 69cd2ee795..2fc85de094 100644 --- a/scripts/test/GoogleAuthenticator.t +++ b/scripts/test/GoogleAuthenticator.t @@ -43,7 +43,7 @@ $ConfigObject->Set( ); # set fixed time to have predetermined verifiable results -$Helper->FixedTimeSet(0); +FixedTimeSet(0); # configure auth backend to db $ConfigObject->Set( @@ -242,7 +242,7 @@ for my $Test (@Tests) { # update time if necessary if ( ( $Test->{FixedTimeSet} || 0 ) ne $CurrentConfig{Time} ) { $CurrentConfig{Time} = $Test->{FixedTimeSet} || 0; - $Helper->FixedTimeSet( $CurrentConfig{Time} ); + FixedTimeSet( $CurrentConfig{Time} ); } # test agent auth diff --git a/scripts/test/Language/Time.t b/scripts/test/Language/Time.t index 4d0307ac59..6ba2898ab0 100644 --- a/scripts/test/Language/Time.t +++ b/scripts/test/Language/Time.t @@ -98,7 +98,7 @@ for my $Test (@Tests) { }, ); - $HelperObject->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); my $Result = $LanguageObject->Time( %{ $Test->{Data} }, diff --git a/scripts/test/Layout/BuildDateSelection.t b/scripts/test/Layout/BuildDateSelection.t index fc745c379f..5d4723897f 100644 --- a/scripts/test/Layout/BuildDateSelection.t +++ b/scripts/test/Layout/BuildDateSelection.t @@ -434,7 +434,7 @@ for my $Test (@Tests) { $BuildSelectionParams{ $Prefix . 'Minute' } = $DateTimeValues->{Minute}; } else { - $HelperObject->FixedTimeSet( $DateTimeObject->ToEpoch() ); + FixedTimeSet( $DateTimeObject->ToEpoch() ); } my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout'); diff --git a/scripts/test/Layout/Template/Render.t b/scripts/test/Layout/Template/Render.t index 2f5925ff33..b7bae821c6 100644 --- a/scripts/test/Layout/Template/Render.t +++ b/scripts/test/Layout/Template/Render.t @@ -527,7 +527,7 @@ for my $Test (@Tests) { }, ); - $HelperObject->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); } # make sure EnvRef is populated every time @@ -566,7 +566,7 @@ for my $Test (@Tests) { if ( $Test->{FixedTimeSet} ) { # Reset time to the current timestamp. - $HelperObject->FixedTimeSet(); + FixedTimeSet(); } } diff --git a/scripts/test/PID.t b/scripts/test/PID.t index fc57420bca..8b221ff106 100644 --- a/scripts/test/PID.t +++ b/scripts/test/PID.t @@ -36,7 +36,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $PIDCreate = $PIDObject->PIDCreate( Name => 'Test' ); $Self->True( diff --git a/scripts/test/PostMaster/FollowUp.t b/scripts/test/PostMaster/FollowUp.t index 3c0378dd62..b2ca790f06 100644 --- a/scripts/test/PostMaster/FollowUp.t +++ b/scripts/test/PostMaster/FollowUp.t @@ -44,7 +44,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $AgentAddress = 'agent@example.com'; my $CustomerAddress = 'external@example.com'; diff --git a/scripts/test/PostMaster/FollowUpArticleVisibilityCheck.t b/scripts/test/PostMaster/FollowUpArticleVisibilityCheck.t index 4d7d4962cd..0106a065c4 100644 --- a/scripts/test/PostMaster/FollowUpArticleVisibilityCheck.t +++ b/scripts/test/PostMaster/FollowUpArticleVisibilityCheck.t @@ -44,7 +44,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $AgentAddress = 'agent@example.com'; my $CustomerAddress = 'external@example.com'; diff --git a/scripts/test/PostMaster/FollowUpCheck/Attachments.t b/scripts/test/PostMaster/FollowUpCheck/Attachments.t index 06835af37c..85c7be8146 100644 --- a/scripts/test/PostMaster/FollowUpCheck/Attachments.t +++ b/scripts/test/PostMaster/FollowUpCheck/Attachments.t @@ -51,7 +51,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $AgentAddress = 'agent@example.com'; my $CustomerAddress = 'external@example.com'; diff --git a/scripts/test/PostMaster/FollowUpCheck/References.t b/scripts/test/PostMaster/FollowUpCheck/References.t index fe11defdfc..244f5970ba 100644 --- a/scripts/test/PostMaster/FollowUpCheck/References.t +++ b/scripts/test/PostMaster/FollowUpCheck/References.t @@ -53,7 +53,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # filter test my @Tests = ( diff --git a/scripts/test/PostMaster/PendingTime.t b/scripts/test/PostMaster/PendingTime.t index c016387344..fd89591364 100644 --- a/scripts/test/PostMaster/PendingTime.t +++ b/scripts/test/PostMaster/PendingTime.t @@ -39,7 +39,7 @@ $Kernel::OM->ObjectParamAdd( ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my %NeededXHeaders = ( 'X-OTOBO-PendingTime' => 1, diff --git a/scripts/test/ProcessManagement/DB/Activity.t b/scripts/test/ProcessManagement/DB/Activity.t index da369f5fbf..abb2e500f9 100644 --- a/scripts/test/ProcessManagement/DB/Activity.t +++ b/scripts/test/ProcessManagement/DB/Activity.t @@ -41,7 +41,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/ProcessManagement/DB/ActivityDialog.t b/scripts/test/ProcessManagement/DB/ActivityDialog.t index ef717d5ec6..7235443fad 100644 --- a/scripts/test/ProcessManagement/DB/ActivityDialog.t +++ b/scripts/test/ProcessManagement/DB/ActivityDialog.t @@ -40,7 +40,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/ProcessManagement/DB/Process.t b/scripts/test/ProcessManagement/DB/Process.t index 5cc97eeed8..d14fdbe17c 100644 --- a/scripts/test/ProcessManagement/DB/Process.t +++ b/scripts/test/ProcessManagement/DB/Process.t @@ -41,7 +41,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/ProcessManagement/DB/Transition.t b/scripts/test/ProcessManagement/DB/Transition.t index 4be6e310e8..2b33adab15 100644 --- a/scripts/test/ProcessManagement/DB/Transition.t +++ b/scripts/test/ProcessManagement/DB/Transition.t @@ -41,7 +41,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/ProcessManagement/DB/TransitionAction.t b/scripts/test/ProcessManagement/DB/TransitionAction.t index 69c13383ee..74d3fc59ed 100644 --- a/scripts/test/ProcessManagement/DB/TransitionAction.t +++ b/scripts/test/ProcessManagement/DB/TransitionAction.t @@ -40,7 +40,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); # define needed variables my $RandomID = $Helper->GetRandomID(); diff --git a/scripts/test/ProcessManagement/TransitionAction/TicketStateSet.t b/scripts/test/ProcessManagement/TransitionAction/TicketStateSet.t index 2d87f084be..e418b697e0 100644 --- a/scripts/test/ProcessManagement/TransitionAction/TicketStateSet.t +++ b/scripts/test/ProcessManagement/TransitionAction/TicketStateSet.t @@ -32,7 +32,7 @@ my $UserObject = $Kernel::OM->Get('Kernel::System::User'); my $ModuleObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::TransitionAction::TicketStateSet'); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # define variables my $UserID = 1; diff --git a/scripts/test/Selenium/Agent/Admin/TicketAppointments.t b/scripts/test/Selenium/Agent/Admin/TicketAppointments.t index 9caf9cc817..e0c7a085a6 100644 --- a/scripts/test/Selenium/Agent/Admin/TicketAppointments.t +++ b/scripts/test/Selenium/Agent/Admin/TicketAppointments.t @@ -194,7 +194,7 @@ $Selenium->RunTest( # Freeze time at this point since creating appointments and tickets and checking results can # take some time to complete. - $Helper->FixedTimeSet(); + FixedTimeSet(); # Create a test ticket. my $TicketTitle = "Ticket$RandomID"; diff --git a/scripts/test/Selenium/Agent/AgentTicketQueue.t b/scripts/test/Selenium/Agent/AgentTicketQueue.t index 1dc1ab92df..2294d0f4fb 100644 --- a/scripts/test/Selenium/Agent/AgentTicketQueue.t +++ b/scripts/test/Selenium/Agent/AgentTicketQueue.t @@ -193,7 +193,7 @@ $Selenium->RunTest( my @TicketIDs; for my $TicketCreate (@Tests) { - $Helper->FixedTimeSet( $TicketCreate->{FixedTimeSet} ) if defined $TicketCreate->{FixedTimeSet}; + FixedTimeSet( $TicketCreate->{FixedTimeSet} ) if defined $TicketCreate->{FixedTimeSet}; my $TicketID = $TicketObject->TicketCreate( Title => 'Selenium Test Ticket', diff --git a/scripts/test/Selenium/Agent/AgentTicketSearch.t b/scripts/test/Selenium/Agent/AgentTicketSearch.t index 229de61494..20600276ff 100644 --- a/scripts/test/Selenium/Agent/AgentTicketSearch.t +++ b/scripts/test/Selenium/Agent/AgentTicketSearch.t @@ -133,7 +133,7 @@ $Selenium->RunTest( String => '2017-05-04 23:00:00', }, ); - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); my @TicketIDs; my $TitleRandom = "Title" . $RandomID; diff --git a/scripts/test/Selenium/Output/Dashboard/TicketGeneric.t b/scripts/test/Selenium/Output/Dashboard/TicketGeneric.t index acb391f4e4..c3d47e01e5 100644 --- a/scripts/test/Selenium/Output/Dashboard/TicketGeneric.t +++ b/scripts/test/Selenium/Output/Dashboard/TicketGeneric.t @@ -35,7 +35,7 @@ $Selenium->RunTest( my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket'); # Set fixed time for test purposes. - $Helper->FixedTimeSet( + FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/Stats/Dynamic/TicketAccountedTimeResult.t b/scripts/test/Stats/Dynamic/TicketAccountedTimeResult.t index 1fbb3f4283..0eed064007 100644 --- a/scripts/test/Stats/Dynamic/TicketAccountedTimeResult.t +++ b/scripts/test/Stats/Dynamic/TicketAccountedTimeResult.t @@ -177,7 +177,7 @@ for my $Ticket (@Tickets) { )->ToEpoch(); # set the fixed time - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # create the ticket my $TicketID = $TicketObject->TicketCreate( @@ -391,7 +391,7 @@ for my $Test (@Tests) { String => $Test->{TimeStamp}, } )->ToEpoch(); - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # print test case description if ( $Test->{Description} ) { diff --git a/scripts/test/Stats/Dynamic/TicketClosedCreatedInQueue.t b/scripts/test/Stats/Dynamic/TicketClosedCreatedInQueue.t index 0dfa34e772..447338b0a1 100644 --- a/scripts/test/Stats/Dynamic/TicketClosedCreatedInQueue.t +++ b/scripts/test/Stats/Dynamic/TicketClosedCreatedInQueue.t @@ -148,7 +148,7 @@ for my $Ticket (@Tickets) { ); # set the fixed time - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # create the ticket my $TicketID = $TicketObject->TicketCreate( diff --git a/scripts/test/Stats/Dynamic/TicketSolutionResponseTimeResult.t b/scripts/test/Stats/Dynamic/TicketSolutionResponseTimeResult.t index 0b070a61cf..4781239c17 100644 --- a/scripts/test/Stats/Dynamic/TicketSolutionResponseTimeResult.t +++ b/scripts/test/Stats/Dynamic/TicketSolutionResponseTimeResult.t @@ -179,7 +179,7 @@ for my $Ticket (@Tickets) { )->ToEpoch(); # set the fixed time - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # create the ticket my $TicketID = $TicketObject->TicketCreate( @@ -426,7 +426,7 @@ for my $Test (@Tests) { String => $Test->{TimeStamp}, } )->ToEpoch(); - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # print test case description if ( $Test->{Description} ) { diff --git a/scripts/test/Stats/Result.t b/scripts/test/Stats/Result.t index a6fe3c23a1..4a2f5e916d 100644 --- a/scripts/test/Stats/Result.t +++ b/scripts/test/Stats/Result.t @@ -326,7 +326,7 @@ for my $Ticket (@Tickets) { )->ToEpoch(); # set the fixed time - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # create the ticket my $TicketID = $TicketObject->TicketCreate( @@ -3935,7 +3935,7 @@ for my $Test (@Tests) { String => $Test->{TimeStamp}, }, )->ToEpoch(); - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); # print test case description if ( $Test->{Description} ) { diff --git a/scripts/test/Stats/TicketSolutionResponseTimeGetStatElement.t b/scripts/test/Stats/TicketSolutionResponseTimeGetStatElement.t index fa674edaf9..56342a2ba3 100644 --- a/scripts/test/Stats/TicketSolutionResponseTimeGetStatElement.t +++ b/scripts/test/Stats/TicketSolutionResponseTimeGetStatElement.t @@ -61,7 +61,7 @@ $Helper->ConfigSettingChange( ); # Set fixed time. -$Helper->FixedTimeSet(); +FixedTimeSet(); my $RandomID = $Helper->GetRandomNumber(); diff --git a/scripts/test/SysConfig/ConfigurationDeploymentSettingListGet.t b/scripts/test/SysConfig/ConfigurationDeploymentSettingListGet.t index 6187752738..776fb75d6f 100644 --- a/scripts/test/SysConfig/ConfigurationDeploymentSettingListGet.t +++ b/scripts/test/SysConfig/ConfigurationDeploymentSettingListGet.t @@ -37,7 +37,7 @@ my $DBObject = $Kernel::OM->Get('Kernel::System::DB'); my $RandomNumber = $HelperObject->GetRandomNumber(); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my $SettingName1 = 'ProductName ' . $RandomNumber . 1; my $SettingName2 = 'ProductName ' . $RandomNumber . 2; diff --git a/scripts/test/SysConfig/ConfigurationInvalidList.t b/scripts/test/SysConfig/ConfigurationInvalidList.t index e172bcd498..1a66d99a73 100644 --- a/scripts/test/SysConfig/ConfigurationInvalidList.t +++ b/scripts/test/SysConfig/ConfigurationInvalidList.t @@ -47,7 +47,7 @@ my $YAMLObject = $Kernel::OM->Get('Kernel::System::YAML'); my $RandomID = $HelperObject->GetRandomID(); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); # clear some tables for my $Table ( qw(sysconfig_modified_version sysconfig_modified sysconfig_default_version sysconfig_default) ) { diff --git a/scripts/test/SysConfig/ConfigurationListGet.t b/scripts/test/SysConfig/ConfigurationListGet.t index b0819fca39..eb49afc1e1 100644 --- a/scripts/test/SysConfig/ConfigurationListGet.t +++ b/scripts/test/SysConfig/ConfigurationListGet.t @@ -44,7 +44,7 @@ my $SysConfigXMLObject = $Kernel::OM->Get('Kernel::System::SysConfig::XML'); my $RandomID = $HelperObject->GetRandomID(); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my $SettingsAdd = sub { my %Param = @_; diff --git a/scripts/test/SysConfig/DB/Deployment.t b/scripts/test/SysConfig/DB/Deployment.t index a70093ac53..4719c007a5 100644 --- a/scripts/test/SysConfig/DB/Deployment.t +++ b/scripts/test/SysConfig/DB/Deployment.t @@ -33,7 +33,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # Get SysConfig DB object. my $SysConfigDBObject = $Kernel::OM->Get('Kernel::System::SysConfig::DB'); diff --git a/scripts/test/SysConfig/DB/DeploymentListCleanup.t b/scripts/test/SysConfig/DB/DeploymentListCleanup.t index c9895613e1..fdac8ae520 100644 --- a/scripts/test/SysConfig/DB/DeploymentListCleanup.t +++ b/scripts/test/SysConfig/DB/DeploymentListCleanup.t @@ -130,7 +130,7 @@ my @Tests = ( }, ); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $SysConfigDBObject = $Kernel::OM->Get('Kernel::System::SysConfig::DB'); diff --git a/scripts/test/SysConfig/DB/DeploymentModifiedVersionList.t b/scripts/test/SysConfig/DB/DeploymentModifiedVersionList.t index ac1898ab68..b7de248ad8 100644 --- a/scripts/test/SysConfig/DB/DeploymentModifiedVersionList.t +++ b/scripts/test/SysConfig/DB/DeploymentModifiedVersionList.t @@ -31,7 +31,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $HelperObject = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my $Home = $Kernel::OM->Get('Kernel::Config')->Get('Home'); my $Location = "$Home/Kernel/Config/Files/ZZZAAuto.pm"; diff --git a/scripts/test/SysConfig/DB/SettingLock.t b/scripts/test/SysConfig/DB/SettingLock.t index 10f9a46dcd..16762564a8 100644 --- a/scripts/test/SysConfig/DB/SettingLock.t +++ b/scripts/test/SysConfig/DB/SettingLock.t @@ -530,7 +530,7 @@ for my $Test (@Tests) { # Set time if needed if ( $TestConfig->{FixedTimeSet} ) { - $HelperObject->FixedTimeSet( $TestConfig->{FixedTimeSet} ); + FixedTimeSet( $TestConfig->{FixedTimeSet} ); } my $ExclusiveLockGUID2; diff --git a/scripts/test/SysConfig/EffectiveValues2PerlFile.t b/scripts/test/SysConfig/EffectiveValues2PerlFile.t index 136d2d8728..efb1dd8331 100644 --- a/scripts/test/SysConfig/EffectiveValues2PerlFile.t +++ b/scripts/test/SysConfig/EffectiveValues2PerlFile.t @@ -30,7 +30,7 @@ use Kernel::System::ObjectManager; # Get needed objects my $HelperObject = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my $CacheObject = $Kernel::OM->Get('Kernel::System::Cache'); diff --git a/scripts/test/SysConfig/OTOBOCommunity/DeploymentRestoreAdvanced.t b/scripts/test/SysConfig/OTOBOCommunity/DeploymentRestoreAdvanced.t index 7019e3b240..41d5e8f5e2 100644 --- a/scripts/test/SysConfig/OTOBOCommunity/DeploymentRestoreAdvanced.t +++ b/scripts/test/SysConfig/OTOBOCommunity/DeploymentRestoreAdvanced.t @@ -31,7 +31,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $HelperObject = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my $Home = $Kernel::OM->Get('Kernel::Config')->Get('Home'); my $Location = "$Home/Kernel/Config/Files/ZZZAAuto.pm"; diff --git a/scripts/test/SysConfig/SettingEffectiveValueCheck.t b/scripts/test/SysConfig/SettingEffectiveValueCheck.t index b6a893c94f..93afcf1888 100644 --- a/scripts/test/SysConfig/SettingEffectiveValueCheck.t +++ b/scripts/test/SysConfig/SettingEffectiveValueCheck.t @@ -52,7 +52,7 @@ $Kernel::OM->Get('Kernel::System::User')->SetPreferences( UserID => 1, ); -$HelperObject->FixedTimeSet(); +FixedTimeSet(); my @Tests = ( { diff --git a/scripts/test/SystemMaintenance.t b/scripts/test/SystemMaintenance.t index 303e21d09d..4bf28d7495 100644 --- a/scripts/test/SystemMaintenance.t +++ b/scripts/test/SystemMaintenance.t @@ -578,7 +578,7 @@ for my $Test (@Tests) { UserID => $UserID, ); - $Helper->FixedTimeSet( + FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/TemplateGenerator/AutoResponse.t b/scripts/test/TemplateGenerator/AutoResponse.t index b13eeb6c18..2be72c9e6c 100644 --- a/scripts/test/TemplateGenerator/AutoResponse.t +++ b/scripts/test/TemplateGenerator/AutoResponse.t @@ -306,7 +306,7 @@ $Self->True( ); # Set fixed time. -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/TemplateGenerator/NotificationEventAddTimezone.t b/scripts/test/TemplateGenerator/NotificationEventAddTimezone.t index 1208fd483e..f478a889c6 100644 --- a/scripts/test/TemplateGenerator/NotificationEventAddTimezone.t +++ b/scripts/test/TemplateGenerator/NotificationEventAddTimezone.t @@ -194,7 +194,7 @@ $Self->True( ); # Set fixed time. -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/TemplateGenerator/Replace.t b/scripts/test/TemplateGenerator/Replace.t index 71d5617de9..ac9f40b9e0 100644 --- a/scripts/test/TemplateGenerator/Replace.t +++ b/scripts/test/TemplateGenerator/Replace.t @@ -169,7 +169,7 @@ my $SystemTime = $Kernel::OM->Create( )->ToEpoch(); # Set the fixed time. -$Helper->FixedTimeSet($SystemTime); +FixedTimeSet($SystemTime); # Create test queue with escalation times. my $QueueID = $Kernel::OM->Get('Kernel::System::Queue')->QueueAdd( diff --git a/scripts/test/TemplateGenerator/Template.t b/scripts/test/TemplateGenerator/Template.t index febdf27144..946e884615 100644 --- a/scripts/test/TemplateGenerator/Template.t +++ b/scripts/test/TemplateGenerator/Template.t @@ -40,7 +40,7 @@ my $DateTimeObject = $Kernel::OM->Create( String => '2020-01-10 16:00:00', }, ); -$Helper->FixedTimeSet($DateTimeObject); +FixedTimeSet($DateTimeObject); # Do not check email addresses. $Helper->ConfigSettingChange( diff --git a/scripts/test/Ticket.t b/scripts/test/Ticket.t index 0fbdf7d243..d634a8afd7 100644 --- a/scripts/test/Ticket.t +++ b/scripts/test/Ticket.t @@ -46,7 +46,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $TicketID = $TicketObject->TicketCreate( Title => 'Some Ticket_Title', diff --git a/scripts/test/Ticket/Article/Backend/Invalid.t b/scripts/test/Ticket/Article/Backend/Invalid.t index 1e6f51cf0d..04be0c513c 100644 --- a/scripts/test/Ticket/Article/Backend/Invalid.t +++ b/scripts/test/Ticket/Article/Backend/Invalid.t @@ -37,7 +37,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # Create test ticket. my $TicketID = $TicketObject->TicketCreate( diff --git a/scripts/test/Ticket/Article/Backend/MIMEBase.t b/scripts/test/Ticket/Article/Backend/MIMEBase.t index f39ed9b399..83abdff021 100644 --- a/scripts/test/Ticket/Article/Backend/MIMEBase.t +++ b/scripts/test/Ticket/Article/Backend/MIMEBase.t @@ -31,7 +31,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # Disable email addresses checking. $Helper->ConfigSettingChange( diff --git a/scripts/test/Ticket/Article/Backend/TransmissionLog.t b/scripts/test/Ticket/Article/Backend/TransmissionLog.t index 961a183f3c..0526805c6c 100644 --- a/scripts/test/Ticket/Article/Backend/TransmissionLog.t +++ b/scripts/test/Ticket/Article/Backend/TransmissionLog.t @@ -34,7 +34,7 @@ $Kernel::OM->ObjectParamAdd( ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); # Use test email backend. $Kernel::OM->Get('Kernel::Config')->Set( diff --git a/scripts/test/Ticket/Event/NotificationEvent/Transport/Email.t b/scripts/test/Ticket/Event/NotificationEvent/Transport/Email.t index d1621cc4b6..c673b959f6 100644 --- a/scripts/test/Ticket/Event/NotificationEvent/Transport/Email.t +++ b/scripts/test/Ticket/Event/NotificationEvent/Transport/Email.t @@ -49,7 +49,7 @@ my $DateTimeObject = $Kernel::OM->Create( }, ); -$Helper->FixedTimeSet($DateTimeObject); +FixedTimeSet($DateTimeObject); my $MailQueueObj = $Kernel::OM->Get('Kernel::System::MailQueue'); @@ -552,7 +552,7 @@ for my $Test (@Tests) { }, ); - $Helper->FixedTimeSet($TestDateTimeObject); + FixedTimeSet($TestDateTimeObject); my $Result = $EventNotificationEventObject->Run( Event => 'TicketDynamicFieldUpdate_DFT1' . $RandomID . 'Update', Data => { @@ -563,7 +563,7 @@ for my $Test (@Tests) { ); # Set FixedTime back for the other tests - $Helper->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); } $SendEmails->(); diff --git a/scripts/test/Ticket/Event/NotificationEvent/Transport/EmailSignedCryptedSMIME.t b/scripts/test/Ticket/Event/NotificationEvent/Transport/EmailSignedCryptedSMIME.t index 8eb83a824f..d8891b8835 100644 --- a/scripts/test/Ticket/Event/NotificationEvent/Transport/EmailSignedCryptedSMIME.t +++ b/scripts/test/Ticket/Event/NotificationEvent/Transport/EmailSignedCryptedSMIME.t @@ -621,7 +621,7 @@ for my $Test (@Tests) { if ( $Test->{FixedTimeSet} ) { # create isolated time environment during test - $Helper->FixedTimeSet( + FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/Ticket/MetaArticle.t b/scripts/test/Ticket/MetaArticle.t index 87242f4b3b..8bc483459f 100644 --- a/scripts/test/Ticket/MetaArticle.t +++ b/scripts/test/Ticket/MetaArticle.t @@ -38,7 +38,7 @@ $Kernel::OM->ObjectParamAdd( }, ); my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); -$Helper->FixedTimeSet(); +FixedTimeSet(); my $TicketID = $TicketObject->TicketCreate( Title => 'Some Ticket_Title', diff --git a/scripts/test/Ticket/Number/Base.t b/scripts/test/Ticket/Number/Base.t index 8c5faaf896..b4486f33f3 100644 --- a/scripts/test/Ticket/Number/Base.t +++ b/scripts/test/Ticket/Number/Base.t @@ -266,7 +266,7 @@ for my $Test (@Tests) { # TicketNumberCounterCleanup() tests. $Cleanup->(); -$Helper->FixedTimeSet(); +FixedTimeSet(); @Tests = ( { Name => '100 - ..1 Sec', diff --git a/scripts/test/Ticket/Number/Date.t b/scripts/test/Ticket/Number/Date.t index 771ec31d27..f8936b8c01 100644 --- a/scripts/test/Ticket/Number/Date.t +++ b/scripts/test/Ticket/Number/Date.t @@ -126,7 +126,7 @@ for my $Test (@Tests) { }, ); - $HelperObject->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); my $TicketNumber = $TicketNumberGeneratorObject->TicketCreateNumber(); diff --git a/scripts/test/Ticket/Number/DateChecksum.t b/scripts/test/Ticket/Number/DateChecksum.t index 4942b659eb..f2b699898c 100644 --- a/scripts/test/Ticket/Number/DateChecksum.t +++ b/scripts/test/Ticket/Number/DateChecksum.t @@ -119,7 +119,7 @@ for my $Test (@Tests) { }, ); - $HelperObject->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); my $TicketNumber = $TicketNumberGeneratorObject->TicketCreateNumber(); diff --git a/scripts/test/Ticket/TicketCreateAfterGet.t b/scripts/test/Ticket/TicketCreateAfterGet.t index 4561edad14..8f8a59cbe6 100644 --- a/scripts/test/Ticket/TicketCreateAfterGet.t +++ b/scripts/test/Ticket/TicketCreateAfterGet.t @@ -43,7 +43,7 @@ $Kernel::OM->ObjectParamAdd( my $Helper = $Kernel::OM->Get('Kernel::System::UnitTest::Helper'); # set fixed time -$Helper->FixedTimeSet(); +FixedTimeSet(); my $TicketID = $TicketObject->TicketCreate( Title => 'Some Ticket_Title', diff --git a/scripts/test/Ticket/TicketMerge.t b/scripts/test/Ticket/TicketMerge.t index eda411324a..85ceb6714d 100644 --- a/scripts/test/Ticket/TicketMerge.t +++ b/scripts/test/Ticket/TicketMerge.t @@ -316,7 +316,7 @@ for my $TicketID (@MergeLinkObjectTicketIDs) { # Test change time and user ID of main ticket on merge action. # See bug#13092 for more information. -$Helper->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { diff --git a/scripts/test/Ticket/TicketSearch/PendingUntilTime.t b/scripts/test/Ticket/TicketSearch/PendingUntilTime.t index ec4d7a6c21..d0b248e2dd 100644 --- a/scripts/test/Ticket/TicketSearch/PendingUntilTime.t +++ b/scripts/test/Ticket/TicketSearch/PendingUntilTime.t @@ -240,7 +240,7 @@ for my $Test (@Tests) { String => $Test->{TimeStamp}, } )->ToEpoch(); - $Helper->FixedTimeSet($SystemTime); + FixedTimeSet($SystemTime); } # print test case description diff --git a/scripts/test/Ticket/TicketSearch/TicketHistory.t b/scripts/test/Ticket/TicketSearch/TicketHistory.t index 728a6f00fb..a3f40efe71 100644 --- a/scripts/test/Ticket/TicketSearch/TicketHistory.t +++ b/scripts/test/Ticket/TicketSearch/TicketHistory.t @@ -58,7 +58,7 @@ for ( 1 .. 2 ) { push @TicketIDs, $TicketID; } -$Helper->FixedTimeSet(); +FixedTimeSet(); $Helper->FixedTimeAddSeconds(60); # update ticket 1 diff --git a/scripts/test/Ticket/TicketSearch/TicketHistoryReferenceForSearchArgument.t b/scripts/test/Ticket/TicketSearch/TicketHistoryReferenceForSearchArgument.t index 7afe6a08b8..a5cba4ca0a 100644 --- a/scripts/test/Ticket/TicketSearch/TicketHistoryReferenceForSearchArgument.t +++ b/scripts/test/Ticket/TicketSearch/TicketHistoryReferenceForSearchArgument.t @@ -137,7 +137,7 @@ for my $Arg (@ArgsWithReference) { $TicketBaseDTObject->Subtract( Minutes => $Test->{FixedTimeMinutes}, ); - $Helper->FixedTimeSet($TicketBaseDTObject); + FixedTimeSet($TicketBaseDTObject); } my $TicketID = $TicketObject->TicketCreate( diff --git a/scripts/test/Time/FixedTimeHelper.t b/scripts/test/Time/FixedTimeHelper.t index bd5b8692a6..d92be84e10 100644 --- a/scripts/test/Time/FixedTimeHelper.t +++ b/scripts/test/Time/FixedTimeHelper.t @@ -34,7 +34,7 @@ my $StartSystemTime = $TimeObject->SystemTime(); sleep 1; - my $FixedTime = $HelperObject->FixedTimeSet(); + my $FixedTime = FixedTimeSet(); sleep 1; diff --git a/scripts/test/Time/MailTimeStamp.t b/scripts/test/Time/MailTimeStamp.t index 5a08ca5e04..880edc202f 100644 --- a/scripts/test/Time/MailTimeStamp.t +++ b/scripts/test/Time/MailTimeStamp.t @@ -116,7 +116,7 @@ for my $Test (@Tests) { Value => $Test->{OTOBOTimeZone}, ); - $HelperObject->FixedTimeSet($DateTimeObject); + FixedTimeSet($DateTimeObject); # Discard time object because of changed time zone $Kernel::OM->ObjectsDiscard( diff --git a/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspend.t b/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspend.t index 9c97f9f558..6f86fdb3ac 100644 --- a/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspend.t +++ b/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspend.t @@ -293,7 +293,7 @@ if ( } # forward the system time -$HelperObject->FixedTimeSet( +FixedTimeSet( $SystemPendingTime + 60, ); diff --git a/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspendLoop.t b/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspendLoop.t index 9a747a6554..f9aafa0d95 100644 --- a/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspendLoop.t +++ b/scripts/test/Znuny4OTOBOEscalationSuspend/EscalationSuspendLoop.t @@ -118,7 +118,7 @@ $ConfigObject->Set( # Thursday : 10:50:08 h # sum: 24:00:00 h # Solution time: Thursday 08:00 + 10:50:08 h = 2016-04-14 18:50:08 -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -170,7 +170,7 @@ my $TicketID = $TicketObject->TicketCreate( # TicketEscalationSuspendCalculate will add 4 minutes to prevent escalation # pending reminder is configured as suspend state # solution time is then 2016-04-14 18:54:08 -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -225,7 +225,7 @@ $TicketObject->TicketPendingTimeSet( # = 16:56:53 and 17:00:02 - 16:56:53 = 3:09 # open is not configured as suspend state, meaning, the new solution time # solution time is then 2016-04-14 18:57:17 -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => { @@ -278,7 +278,7 @@ $TicketObject->TicketPendingTimeSet( # Set pending reminder # this adds another 4 minutes to the solution time # new solution time: Friday 2016-04-15 08:01:17 -$HelperObject->FixedTimeSet( +FixedTimeSet( $Kernel::OM->Create( 'Kernel::System::DateTime', ObjectParams => {