/tags/2.3/t/15_test_block_hist.t
http://perlwikipedia.googlecode.com/ · Raku · 25 lines · 9 code · 9 blank · 7 comment · 0 complexity · 9442888977c144a07b1dabfa288d6d3b MD5 · raw file
- # Before `make install' is performed this script should be runnable with
- # `make test'. After `make install' it should work as `perl MediaWiki::Bot.t'
- #########################
- # change 'tests => 1' to 'tests => last_test_to_print';
- use Test::More tests => 1;
- #########################
- # Insert your test code below, the Test::More module is use()ed here so read
- # its man page ( perldoc Test::More ) for help writing this test script.
- use strict;
- use MediaWiki::Bot;
- my $wikipedia = MediaWiki::Bot->new("PWP test");
- if(defined($ENV{'PWPMakeTestSetWikiHost'})) {
- $wikipedia->set_wiki($ENV{'PWPMakeTestSetWikiHost'}, $ENV{'PWPMakeTestSetWikiDir'});
- }
- my $result = $wikipedia->test_block_hist("User:Jimbo Wales");
- is($result, 1, "block history");