diff --git a/t/lib/WebGUI/Test.pm b/t/lib/WebGUI/Test.pm index 96728b352..349fd3cb6 100644 --- a/t/lib/WebGUI/Test.pm +++ b/t/lib/WebGUI/Test.pm @@ -1,9 +1,5 @@ package WebGUI::Test; -use strict; -use warnings; -use Clone qw/clone/; - =head1 LEGAL ------------------------------------------------------------------- @@ -26,6 +22,12 @@ Utility module for making testing in WebGUI easier. =cut + +use strict; +use warnings; +use Clone qw/clone/; +use Test::MockObject; + our ( $SESSION, $WEBGUI_ROOT, $CONFIG_FILE, $WEBGUI_LIB, $WEBGUI_TEST_COLLATERAL ); use Config qw[]; @@ -66,8 +68,16 @@ my $smtpdPid; my $smtpdStream; my $smtpdSelect; +my $mocker; + BEGIN { + $mocker = Test::MockObject->fake_module( + 'APR::Request::Apache2', + handle => sub { return bless {}, 'APR::Request::Apache2'; }, + jar => sub { return { }; }, + ); + STDERR->autoflush(1); $CONFIG_FILE = $ENV{ WEBGUI_CONFIG };