6 if ($ENV{NOINTERNET} ) {
7 use Test::More skip_all => "We don't have internet here";
11 use constant LANGUAGES => qw( en it ja es nl pl );
12 use Test::More tests => 3 + (2 * scalar LANGUAGES);
15 use_ok( 'WWW::Mechanize' );
18 my $mech = WWW::Mechanize->new;
19 isa_ok( $mech, 'WWW::Mechanize', 'Created object' );
20 $mech->agent_alias( 'Windows IE 6' ); # Wikipedia 403s out obvious bots
22 for my $lang ( LANGUAGES ) {
23 my $start = "http://$lang.wikipedia.org/";
27 ok( $mech->success, "Got $start" );
28 my @links = $mech->links();
29 cmp_ok( scalar @links, '>', 50, "Over 50 links on $start" );
33 eval 'use Test::Memory::Cycle';
34 skip 'Test::Memory::Cycle not installed', 1 if $@;
36 memory_cycle_ok( $mech, 'No memory cycles found' );