MediaWiki
REL1_24
|
00001 <?php 00021 require_once 'ApiQueryContinueTestBase.php'; 00022 00029 class ApiQueryContinue2Test extends ApiQueryContinueTestBase { 00030 protected $exceptionFromAddDBData; 00031 00036 function addDBData() { 00037 try { 00038 $this->editPage( 'AQCT73462-A', '**AQCT73462-A** [[AQCT73462-B]] [[AQCT73462-C]]' ); 00039 $this->editPage( 'AQCT73462-B', '[[AQCT73462-A]] **AQCT73462-B** [[AQCT73462-C]]' ); 00040 $this->editPage( 'AQCT73462-C', '[[AQCT73462-A]] [[AQCT73462-B]] **AQCT73462-C**' ); 00041 $this->editPage( 'AQCT73462-A', '**AQCT73462-A** [[AQCT73462-B]] [[AQCT73462-C]]' ); 00042 $this->editPage( 'AQCT73462-B', '[[AQCT73462-A]] **AQCT73462-B** [[AQCT73462-C]]' ); 00043 $this->editPage( 'AQCT73462-C', '[[AQCT73462-A]] [[AQCT73462-B]] **AQCT73462-C**' ); 00044 } catch ( Exception $e ) { 00045 $this->exceptionFromAddDBData = $e; 00046 } 00047 } 00048 00052 public function testA() { 00053 $this->mVerbose = false; 00054 $mk = function ( $g, $p, $gDir ) { 00055 return array( 00056 'generator' => 'allpages', 00057 'gapprefix' => 'AQCT73462-', 00058 'prop' => 'links', 00059 'gaplimit' => "$g", 00060 'pllimit' => "$p", 00061 'gapdir' => $gDir ? "ascending" : "descending", 00062 ); 00063 }; 00064 // generator + 1 prop + 1 list 00065 $data = $this->query( $mk( 99, 99, true ), 1, 'g1p', false ); 00066 $this->checkC( $data, $mk( 1, 1, true ), 6, 'g1p-11t' ); 00067 $this->checkC( $data, $mk( 2, 2, true ), 3, 'g1p-22t' ); 00068 $this->checkC( $data, $mk( 1, 1, false ), 6, 'g1p-11f' ); 00069 $this->checkC( $data, $mk( 2, 2, false ), 3, 'g1p-22f' ); 00070 } 00071 }