diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 46a98dd6c..217be9d47 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -15,7 +15,6 @@ package WebGUI::Macro; =cut use strict; -use warnings; use WebGUI::Pluggable; =head1 NAME diff --git a/t/Group.t b/t/Group.t index bea2716a5..bfedff3d5 100644 --- a/t/Group.t +++ b/t/Group.t @@ -169,10 +169,14 @@ $lGroup->delete; my $gid = $g->getId; is (length($gid), 22, "GroupId is proper length"); -is_deeply ($g->getGroupsIn(), [3], 'Admin group added by default to this group'); -is_deeply ($g->getGroupsFor(), [], 'Group not added to any other group'); -is_deeply ($g->getUsers(), [], 'No users added by default'); -is_deeply ($g->getAllUsers(), [3], 'No users added by default in any method'); +{ + # our invalid db query from earlier is going to error, keep it quiet + local $SIG{__WARN__} = sub {}; + is_deeply ($g->getGroupsIn(), [3], 'Admin group added by default to this group'); + is_deeply ($g->getGroupsFor(), [], 'Group not added to any other group'); + is_deeply ($g->getUsers(), [], 'No users added by default'); + is_deeply ($g->getAllUsers(), [3], 'No users added by default in any method'); +} my $gname = '**TestGroup**'; is ($g->name($gname), $gname, 'Set name'); diff --git a/t/Macro/SQL.t b/t/Macro/SQL.t index f00a232c0..a9b809487 100644 --- a/t/Macro/SQL.t +++ b/t/Macro/SQL.t @@ -141,6 +141,9 @@ SKIP: { skip "Unable to load $macro", $numTests-1 unless $loaded; foreach my $testSet (@testSets) { + # we know some of these will fail. Keep them quiet. + local $SIG{__WARN__} = sub {}; + my $output = WebGUI::Macro::SQL::process($session, $testSet->{sql}, $testSet->{template}); is($output, $testSet->{output}, $testSet->{comment}); } diff --git a/t/SQL.t b/t/SQL.t index 1c39e93a0..3323cf5a4 100644 --- a/t/SQL.t +++ b/t/SQL.t @@ -50,7 +50,11 @@ ok($sth->rows > 1, "rows()"); ok($sth->finish, "finish()"); # unconditionalRead -ok(my $sth = $session->db->unconditionalRead("select * from tableThatDoesntExist"), "unconditionalRead()"); +{ + # we know this will fail, so keep it quiet + local $SIG{__WARN__} = sub {}; + ok(my $sth = $session->db->unconditionalRead("select * from tableThatDoesntExist"), "unconditionalRead()"); +} # errorCode is($sth->errorCode, "1146" ,"errorCode()");