NAME
Apache2::ASP::Test::Base - Base class for Apache2::ASP unit tests
SYNOPSIS
#!perl -w
use strict;
use warnings 'all';
use base 'Apache2::ASP::Test::Base';
use Test::More 'no_plan';
# Initialize our object:
my $s = __PACKAGE__->SUPER::new();
my $res = $s->ua->get("/hello.asp");
is(
$res->is_success => 1,
"Got /hello.asp successfully."
);
like(
$res->content,
qr/Hello, World\!/,
"The content of /hello.asp looks good."
);
DESCRIPTION
Apache2::ASP::Test::Base
brings simplicity to writing unit tests for your Apache2::ASP web applications.
METHODS
new( )
Returns a new Apache2::ASP::Test::Base
object.
PUBLIC PROPERTIES
config
Returns the current active instance of Apache2::ASP::Config in effect.
asp
Returns the current Apache2::ASP::Base object.
ua
Returns the current Apache2::ASP::Test::UserAgent object.
session
Returns the current Apache2::ASP::SessionStateManager object (or an instance of your specified subclass of it).
data
If $config.application_root/etc/test_fixtures.yaml
exists and can be parsed by YAML, data
will return the current Apache2::ASP::Test::Fixtures object.
diags
If $config.application_root/etc/test_fixtures.yaml
exists and can be parsed by YAML, data
will return the current Data::Properties::YAML object.
SEE ALSO
The tests under the t/
folder in this distribution, which make extensive use of Apache2::ASP::Test::Base
.
BUGS
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.
HOMEPAGE
Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.
AUTHOR
John Drago mailto:jdrago_999@yahoo.com
COPYRIGHT AND LICENSE
Copyright 2007 John Drago, All rights reserved.
This software is free software. It may be used and distributed under the same terms as Perl itself.