package Bric::Test::DevBase; =head1 NAME Bric::Test::DevBase - Bricolage Development Testing Base Class =head1 VERSION $LastChangedRevision$ =cut # Grab the Version Number. require Bric; our $VERSION = Bric->VERSION; =head1 DATE $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $ =head1 SYNOPSIS package Bric::Biz::Person::DevTest; use strict; use warnings; use base qw(Bric::Test::DevBase); use Test::More; use Bric::Biz::Person; use Bric::Util::Grp::Person; sub table { 'person' } my $epoch = CORE::time; # Write some tests. sub test_me : Test(4) { my $self = shift; # Make time static for the duration of this test method. no warnings qw(redefine); local *CORE::GLOBAL::time = sub () { $epoch }; # Run some tests. ok( my $p = Bric::Biz::Person->new, "create" ); ok( $p->save, "save" ); $self->add_del_ids($p->get_id); ok( my $grp = Bric::Util::Grp::Person->new, "create grp" ); ok( $grp->save, "Save grp" ); $self->add_del_ids($grp->get_id, 'grp' ); } =head1 DESCRIPTION This class is the base class for all of the Bricolage development testing classes. It uses the L module as I base class, and thus all of its subclasses get all of its benefits. It also has a number of methods of its own that are designed to be used in classes inherited from this class. They help keep the database cleaned up and such. And finally, it sets up the admin user object in the session so that event logging and the like works properly and overrides the Perl core C