Maplat
view release on metacpan or search on metacpan
t/22-complexweb.t view on Meta::CPAN
#########################
# There is currently a problem under Windows with Date::Manip on
# certain non-english installations of XP (and possible others).
#
# So we set our time zone to CET
BEGIN {
if(!defined($ENV{TZ})) {
$ENV{TZ} = "CET";
}
}
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use strict;
use warnings;
use Test::More;
use Socket;
my $hasMemcached;
BEGIN {
if ( not $ENV{TEST_PG} ) {
my $msg = 'DBI/DBD::PG test. Set $ENV{TEST_PG} to a true value to run.';
plan( skip_all => $msg );
}
plan tests => 47;
use_ok('Maplat::Web');
use_ok('Time::HiRes', qw(sleep usleep));
use_ok('XML::Simple');
use_ok('WWW::Mechanize');
use_ok('Maplat::Web::MemCacheSim');
unshift @INC, "t";
use_ok('Maplat::Web::HelloWorld');
require("t/testhelpers.pm");
my $daemon_status = connect_memcached();
if($daemon_status ne "OK") {
warn("No running memcached - using SIM\n");
$hasMemcached = 0;
} else {
$hasMemcached = 1;
}
};
use DBI ':sql_types';
use DBD::Pg ':pg_types';
use lib 't','.';
require 'dbdpg_test_setup.pl';
select(($|=1,select(STDERR),$|=1)[1]);
our $APPNAME = "Maplat Webtest";
our $VERSION = "0.95";
my ($testdsn,$testuser) = get_test_settings();
if ($testdsn =~ /FAIL/ || $testuser =~ /FAIL/) {
fail("Can't get test database");
exit(1);
}
#warn("DSN: $testdsn : User: $testuser\n");
#exit(0);
chdir "t";
my $configfile = "configs/webgui.xml";
if(!-f $configfile) {
fail("Missing config file");
exit(1);
( run in 1.816 second using v1.01-cache-2.11-cpan-5837b0d9d2c )