Apache2-API
view release on metacpan or search on metacpan
t/lib/Test/Apache2/API/Response.pm view on Meta::CPAN
# printf
# puts
# redirect
# referrer_policy
# request
# retry_after
# rflush
# send_cgi_header
sub sendfile { return( shift->_test({ method => 'sendfile', expect => APR::Const::SUCCESS, args => [__FILE__] }) ); }
# server
# server_timing
# set_content_length
# set_cookie
# set_etag
# set_keepalive
# 2021-11-1T167:12:10+0900
sub set_last_modified { return( shift->_test({ method => 'set_last_modified', expect => sub
{
return(1);
}, args => [1635754330] }) ); }
sub socket { return( shift->_test({ method => 'socket', expect => 'APR::Socket', type => 'isa' }) ); }
# sourcemap
# status
# status_line
# strict_transport_security
# subprocess_env
# timing_allow_origin
# trailer
# transfer_encoding
# unescape
# upgrade
# update_mtime
# uri_escape
# uri_unescape
# url_decode
# url_encode
# vary
# via
# want_digest
# warning
# write
# www_authenticate
# x_content_type_options
# x_dns_prefetch_control
# x_frame_options
# x_xss_protection
sub _target { return( shift->api->response ); }
1;
# NOTE: POD
# Use this to generate the tests list:
# egrep -E '^sub ' ./t/lib/Test/Apache2/API/Response.pm | perl -lnE 'my $m = [split(/\s+/, $_)]->[1]; say "=head2 $m\n"'
__END__
=encoding utf8
=head1 NAME
Test::Apache2::API::Response - Apache2::API::Response Testing Class
=head1 SYNOPSIS
my $hostport = Apache::TestRequest::hostport( $config ) || '';
my( $host, $port ) = split( ':', ( $hostport ) );
my $mp_host = 'www.example.org';
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1 );
my $ua = Apache::TestRequest->new;
# To get the fingerprint for the certificate in ./t/server.crt, do:
# echo "sha1\$$(openssl x509 -noout -in ./t/server.crt -fingerprint -sha1|perl -pE 's/^.*Fingerprint=|(\w{2})(?:\:?|$)/$1/g')"
$ua->ssl_opts(
# SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE,
# SSL_verify_mode => 0x00
# verify_hostname => 0,
SSL_fingerprint => 'sha1$DEE8650E44870896E821AAE4A5A24382174D100E',
# SSL_version => 'SSLv3',
# SSL_verfifycn_name => 'localhost',
);
my $req = HTTP::Request->new( 'GET' => "${proto}://${hostport}/tests/response/some_method" );
my $resp = $ua->request( $req );
is( $resp->code, Apache2::Const::HTTP_OK, 'some test name' );
=head1 VERSION
v0.1.0
=head1 DESCRIPTION
This is a package for testing the L<Apache2::API> module under Apache2/modperl2 and inherits from C<Test::Apache::Common>
=head1 TESTS
=head2 connection
=head2 headers
=head2 headers_out
=head2 make_etag
=head2 no_cache
=head2 no_local_copy
=head2 sendfile
=head2 set_last_modified
=head2 socket
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
=head1 SEE ALSO
( run in 0.690 second using v1.01-cache-2.11-cpan-39bf76dae61 )