Skip to content

Commit

Permalink
Issue #1033: pull some slight code tidyings from rel-10_1
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Jul 13, 2021
1 parent 0674fc0 commit 1a11b42
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Kernel/System/XML/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ sub XMLIn {
Priority => 'error',
Message => "Parameter Options needs to be a hash ref!",
);

return;
}

my $PerlStructure;
eval {
my $PerlStructure = eval {

my $XMLSimpleObject = XML::LibXML::Simple->new();

$PerlStructure = $XMLSimpleObject->XMLin(
return $XMLSimpleObject->XMLin(
$Param{XMLInput},
$Param{Options} ? %{ $Param{Options} } : (),
);
Expand Down
4 changes: 2 additions & 2 deletions scripts/restore.pl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@

# set password via environment variable if there is one
if ($DatabasePw) {
$ENV{'PGPASSWORD'} = $DatabasePw; ## no critic qw(Variables::RequireLocalizedPunctuationVars)
$ENV{PGPASSWORD} = $DatabasePw; ## no critic qw(Variables::RequireLocalizedPunctuationVars)
}
say "Restore database into $DB ...";
system(
Expand All @@ -286,7 +286,7 @@

# set password via environment variable if there is one
if ($DatabasePw) {
$ENV{'PGPASSWORD'} = $DatabasePw; ## no critic qw(Variables::RequireLocalizedPunctuationVars)
$ENV{PGPASSWORD} = $DatabasePw; ## no critic qw(Variables::RequireLocalizedPunctuationVars)
}
say "Restore database into $DB ...";
system(
Expand Down
8 changes: 4 additions & 4 deletions scripts/test/DateTime.t
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ $Self->IsDeeply(
#
# Tests for creating DateTime objects with given date and time
#
my @TestConfigs = (
my @DateTimeTestConfigs = (
{
Params => {
Year => 2016,
Expand Down Expand Up @@ -316,7 +316,7 @@ my @TestConfigs = (
);

TESTCONFIG:
for my $TestConfig (@TestConfigs) {
for my $TestConfig (@DateTimeTestConfigs) {

# Create DateTime object
$DateTimeObject = $Kernel::OM->Create(
Expand Down Expand Up @@ -359,7 +359,7 @@ for my $TestConfig (@TestConfigs) {
#
# Tests for creating and setting DateTime object via string
#
@TestConfigs = (
my @StringTestConfigs = (
{
Data => {
String => '2016-02-28 14:59:00',
Expand Down Expand Up @@ -439,7 +439,7 @@ for my $TestConfig (@TestConfigs) {
},
);

for my $TestConfig (@TestConfigs) {
for my $TestConfig (@StringTestConfigs) {
my $DateTimeObject = $Kernel::OM->Create(
'Kernel::System::DateTime',
ObjectParams => $TestConfig->{Data},
Expand Down
7 changes: 1 addition & 6 deletions scripts/test/Selenium/Agent/Admin/AdminACL.t
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,8 @@ $Selenium->RunTest(
'Client side validation correctly detected missing input value',
);

my @TestACLNames;

# Create test ACL names.
for my $Name (qw(ACL NewACL)) {
my $TestACLName = $Name . $Helper->GetRandomNumber() . ' $ @';
push @TestACLNames, $TestACLName;
}
my @TestACLNames = map { $_ . $Helper->GetRandomNumber() . ' $ @' } qw(ACL NewACL);

# Test for Bug#14411, 300 is more than the allowed by the filed (200), exceeding characters
# are just not typed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ $Selenium->RunTest(
# The class Hidden is only removed when the upload is complete.
$Selenium->WaitFor(
JavaScript =>
"return typeof(\$) === 'function' && \$('.AttachmentDelete i').length"
q{return typeof($) === 'function' && $('.AttachmentDelete i').length}
);

# Check if uploaded.
Expand Down

0 comments on commit 1a11b42

Please sign in to comment.