Debian Codegraph @

t/enhancement31.t

raw symbols SCIP
1 use Test::More tests=>2;
2
3 # Include the test hierarchy
4 use lib 't/lib';
5
6 use CGI;
7 use TestCGI;
8 use TestApp9;
9
10 # Prevent output to STDOUT
11 $ENV{CGI_APP_RETURN_ONLY} = 1;
12
13 # Query object may be initialized via new()
14 # to a non-CGI.pm object type
15 {
16 my $cgi_obj = TestCGI->new();
17 my $testapp = TestApp9->new(QUERY=>$cgi_obj);
18 my $query_back = $testapp->query();
19 isa_ok($query_back, "TestCGI");
20 }
21
22
23 # $CGIApp->header_type('none') returns only content.
24 {
25 my $q = CGI->new({rm=>"noheader"});
26 my $app = TestApp9->new(QUERY=>$q);
27 my $output = $app->run();
28 unlike($output, qr/^Content\-Type\:\ text\/html/, "Headers 'none'");
29 }