<commit_before># --
# TicketType.t - TicketTypeSet testscript
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: TicketTypeSet.t,v 1.2 2012-12-17 17:38:32 cr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

use strict;
use warnings;
use utf8;
use vars qw($Self);

use Kernel::Config;
use Kernel::System::UnitTest::Helper;
use Kernel::System::Ticket;
use Kernel::System::Type;
use Kernel::System::User;
use Kernel::System::ProcessManagement::TransitionAction::TicketTypeSet;

use Kernel::System::VariableCheck qw(:all);

# create local objects
my $HelperObject = Kernel::System::UnitTest::Helper->new(
    %{$Self},
    UnitTestObject             => $Self,
    RestoreSystemConfiguration => 0,
);
my $ConfigObject = Kernel::Config->new();

# enable ticket type for this run
$ConfigObject->Set(
    Key   => 'Ticket::Type',
    Value => 1,
);

# set TicketDynamicFieldDefault as no Transation mode to avoid error messages at the end of the
# test (regarding missing TicketIDs)
$ConfigObject->Set(
    Key   => 'Ticket::EventModulePost###TicketDynamicFieldDefault',
    Value => {
        Module      => 'Kernel::System::Ticket::Event::NotificationEvent',
        Transaction => 0,
        Event       => '',
    },
);

my $TicketObject = Kernel::System::Ticket->new(
    %{$Self},
    ConfigObject => $ConfigObject,
);
my $TypeObject = Kernel::System::Type->new(
    %{$Self},
    ConfigObject => $ConfigObject,
);
my $ModuleObject = Kernel::System::ProcessManagement::TransitionAction::TicketTypeSet->new(
    %{$Self},
    ConfigObject => $ConfigObject,
    TicketObject => $TicketObject,
);

# define variables
my $UserID     = 1;
my $ModuleName = 'TicketTypeSet';
my $RandomID   = $HelperObject->GetRandomID();

my $Type1Name = 'Type1' . $RandomID;
my $Type2Name = 'Type2' . $RandomID;
my $Type3Name = 'Type3' . $RandomID;

my $Type1ID = $TypeObject->TypeAdd(
    Name    => $Type1Name,
    ValidID => 1,<commit_msg>Fixed wrong event module configuration.<commit_after># --
# TicketType.t - TicketTypeSet testscript
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: TicketTypeSet.t,v 1.3 2012-12-17 17:46:32 cr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

use strict;
use warnings;
use utf8;
use vars qw($Self);

use Kernel::Config;
use Kernel::System::UnitTest::Helper;
use Kernel::System::Ticket;
use Kernel::System::Type;
use Kernel::System::User;
use Kernel::System::ProcessManagement::TransitionAction::TicketTypeSet;

use Kernel::System::VariableCheck qw(:all);

# create local objects
my $HelperObject = Kernel::System::UnitTest::Helper->new(
    %{$Self},
    UnitTestObject             => $Self,
    RestoreSystemConfiguration => 0,
);
my $ConfigObject = Kernel::Config->new();

# enable ticket type for this run
$ConfigObject->Set(
    Key   => 'Ticket::Type',
    Value => 1,
);

# set TicketDynamicFieldDefault as no Transation mode to avoid error messages at the end of the
# test (regarding missing TicketIDs)
$ConfigObject->Set(
    Key   => 'Ticket::EventModulePost###TicketDynamicFieldDefault',
    Value => {
        Module      => 'Kernel::System::Ticket::Event::TicketDynamicFieldDefault',
        Transaction => 0,
    },
);

my $TicketObject = Kernel::System::Ticket->new(
    %{$Self},
    ConfigObject => $ConfigObject,
);
my $TypeObject = Kernel::System::Type->new(
    %{$Self},
    ConfigObject => $ConfigObject,
);
my $ModuleObject = Kernel::System::ProcessManagement::TransitionAction::TicketTypeSet->new(
    %{$Self},
    ConfigObject => $ConfigObject,
    TicketObject => $TicketObject,
);

# define variables
my $UserID     = 1;
my $ModuleName = 'TicketTypeSet';
my $RandomID   = $HelperObject->GetRandomID();

my $Type1Name = 'Type1' . $RandomID;
my $Type2Name = 'Type2' . $RandomID;
my $Type3Name = 'Type3' . $RandomID;

my $Type1ID = $TypeObject->TypeAdd(
    Name    => $Type1Name,
    ValidID => 1,
{'fraction_non_alphanumeric': 0.15224092957078492, 'fraction_numerical': 0.01802229072800569, 'mean_word_length': 4.239751552795031, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1462373', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1367, 'n_words': 344}