/tags/2.3/t/15_test_block_hist.t
Unknown | 25 lines | 16 code | 9 blank | 0 comment | 0 complexity | 9442888977c144a07b1dabfa288d6d3b MD5 | raw file
Possible License(s): GPL-3.0
1# Before `make install' is performed this script should be runnable with 2# `make test'. After `make install' it should work as `perl MediaWiki::Bot.t' 3 4######################### 5 6# change 'tests => 1' to 'tests => last_test_to_print'; 7 8use Test::More tests => 1; 9 10######################### 11 12# Insert your test code below, the Test::More module is use()ed here so read 13# its man page ( perldoc Test::More ) for help writing this test script. 14 15use strict; 16use MediaWiki::Bot; 17 18my $wikipedia = MediaWiki::Bot->new("PWP test"); 19 20if(defined($ENV{'PWPMakeTestSetWikiHost'})) { 21 $wikipedia->set_wiki($ENV{'PWPMakeTestSetWikiHost'}, $ENV{'PWPMakeTestSetWikiDir'}); 22} 23 24my $result = $wikipedia->test_block_hist("User:Jimbo Wales"); 25is($result, 1, "block history");