Enable tests to work around HTTP cookie fetching. Finally!
This commit is contained in:
parent
ed97fa1ecd
commit
f69df9b7ca
1 changed files with 14 additions and 4 deletions
|
|
@ -1,9 +1,5 @@
|
||||||
package WebGUI::Test;
|
package WebGUI::Test;
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Clone qw/clone/;
|
|
||||||
|
|
||||||
=head1 LEGAL
|
=head1 LEGAL
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
|
@ -26,6 +22,12 @@ Utility module for making testing in WebGUI easier.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Clone qw/clone/;
|
||||||
|
use Test::MockObject;
|
||||||
|
|
||||||
our ( $SESSION, $WEBGUI_ROOT, $CONFIG_FILE, $WEBGUI_LIB, $WEBGUI_TEST_COLLATERAL );
|
our ( $SESSION, $WEBGUI_ROOT, $CONFIG_FILE, $WEBGUI_LIB, $WEBGUI_TEST_COLLATERAL );
|
||||||
|
|
||||||
use Config qw[];
|
use Config qw[];
|
||||||
|
|
@ -66,8 +68,16 @@ my $smtpdPid;
|
||||||
my $smtpdStream;
|
my $smtpdStream;
|
||||||
my $smtpdSelect;
|
my $smtpdSelect;
|
||||||
|
|
||||||
|
my $mocker;
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
||||||
|
$mocker = Test::MockObject->fake_module(
|
||||||
|
'APR::Request::Apache2',
|
||||||
|
handle => sub { return bless {}, 'APR::Request::Apache2'; },
|
||||||
|
jar => sub { return { }; },
|
||||||
|
);
|
||||||
|
|
||||||
STDERR->autoflush(1);
|
STDERR->autoflush(1);
|
||||||
|
|
||||||
$CONFIG_FILE = $ENV{ WEBGUI_CONFIG };
|
$CONFIG_FILE = $ENV{ WEBGUI_CONFIG };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue