Enable tests to work around HTTP cookie fetching. Finally!

This commit is contained in:
Colin Kuskie 2009-08-14 01:38:44 +00:00
parent ed97fa1ecd
commit f69df9b7ca

View file

@ -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 };