From: Moritz Bunkus Date: Wed, 27 Feb 2013 13:12:45 +0000 (+0100) Subject: TestSetup: $::request muss eine Instanz von SL::Request sein X-Git-Tag: release-3.1.0beta1~598 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dac8a13645336de9db50c3d1ee5c5009ec129958;p=kivitendo-erp.git TestSetup: $::request muss eine Instanz von SL::Request sein --- diff --git a/t/Support/TestSetup.pm b/t/Support/TestSetup.pm index c0b9e782d..671e6d9dc 100644 --- a/t/Support/TestSetup.pm +++ b/t/Support/TestSetup.pm @@ -9,8 +9,10 @@ use SL::Form; use SL::Locale; use SL::LXDebug; use Data::Dumper; +use SL::Layout::None; use SL::LxOfficeConf; use SL::InstanceConfiguration; +use SL::Request; sub _login { my $login = shift; @@ -25,7 +27,7 @@ sub _login { $::form = Form->new; $::auth = SL::Auth->new; $::instance_conf = SL::InstanceConfiguration->new; - $::request = { cgi => CGI->new({}) }; + $::request = SL::Request->new( cgi => CGI->new({}), layout => SL::Layout::None->new ); die 'cannot reach auth db' unless $::auth->session_tables_present; diff --git a/t/controllers/base/render.t b/t/controllers/base/render.t index 716ba428c..0f252bbe2 100644 --- a/t/controllers/base/render.t +++ b/t/controllers/base/render.t @@ -15,10 +15,10 @@ Support::TestSetup::login(); sub reset_test_env { $ENV{HTTP_USER_AGENT} = 'Perl Tests'; - $::request = { + $::request = SL::Request->new( cgi => CGI->new({}), layout => SL::Layout::Javascript->new, - }; + ); $::myconfig{menustyle} = 'javascript';