lots of test fixes

This commit is contained in:
Graham Knop 2010-06-13 06:19:41 -05:00
parent 0d311117e2
commit 30657d61f7
21 changed files with 75 additions and 87 deletions

View file

@ -25,7 +25,7 @@ my $session = WebGUI::Test->session;
##can be retrieved via the macro. There are also tests for null, undef,
##and non-existant keys.
my %env = %{ $session->env->{_env} };
my %env = %{ $session->request->env };
my @keys = keys %env;
my $numTests = 3 + scalar keys %env;

View file

@ -29,12 +29,9 @@ $session->user({userId=>1});
##Replace the original ENV hash with one that will return a
##known user agent. Since it usually contains a reference to %ENV,
##you can't just modify that hash since it's protected
my $origEnv = $session->{_env};
my %newEnvHash = (
'HTTP_USER_AGENT' => 'mozilla',
'QUERY_STRING' => 'func=search',
);
$session->{_env}->{_env} = \%newEnvHash;
my $env = $session->request->env;
$env->{'HTTP_USER_AGENT'} = 'mozilla';
$env->{'QUERY_STRING'} = 'func=search';
my $i18n = WebGUI::International->new($session,'Macro_L_loginBox');
@ -122,7 +119,7 @@ like($vars{'username.form'}, qr/size="16"/, 'boxSize set in username.form');
like($vars{'password.form'}, qr/size="16"/, 'boxSize set in password.form');
##Change browser to be MSIE like and watch boxSize change
$newEnvHash{'HTTP_USER_AGENT'} = "msie";
$env->{'HTTP_USER_AGENT'} = 'msie';
$output = WebGUI::Macro::L_loginBox::process($session,24,'Log In',$template->getId);
%vars = simpleTextParser($output);