Go to the documentation of this file.
3 require_once __DIR__ .
"/../../../maintenance/backupPrefetch.inc";
21 if ( $this->dump !==
null ) {
38 $this->assertEquals( $expected, $this->dump->prefetch( $page, $revision ),
39 "Prefetch of page $page revision $revision" );
114 $this->dump =
new BaseDump( $fname1 .
";" . $fname2 );
126 $this->dump =
new BaseDump( $fname1 .
";" . $fname2 .
";" . $fname3 );
135 $this->dump =
new BaseDump( $fname1 .
";" . $fname2 );
154 $header =
'<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en">
156 <sitename>wikisvn</sitename>
157 <base>http://localhost/wiki-svn/index.php/Main_Page</base>
158 <generator>MediaWiki 1.21alpha</generator>
159 <case>first-letter</case>
161 <namespace key="-2" case="first-letter">Media</namespace>
162 <namespace key="-1" case="first-letter">Special</namespace>
163 <namespace key="0" case="first-letter" />
164 <namespace key="1" case="first-letter">Talk</namespace>
165 <namespace key="2" case="first-letter">User</namespace>
166 <namespace key="3" case="first-letter">User talk</namespace>
167 <namespace key="4" case="first-letter">Wikisvn</namespace>
168 <namespace key="5" case="first-letter">Wikisvn talk</namespace>
169 <namespace key="6" case="first-letter">File</namespace>
170 <namespace key="7" case="first-letter">File talk</namespace>
171 <namespace key="8" case="first-letter">MediaWiki</namespace>
172 <namespace key="9" case="first-letter">MediaWiki talk</namespace>
173 <namespace key="10" case="first-letter">Template</namespace>
174 <namespace key="11" case="first-letter">Template talk</namespace>
175 <namespace key="12" case="first-letter">Help</namespace>
176 <namespace key="13" case="first-letter">Help talk</namespace>
177 <namespace key="14" case="first-letter">Category</namespace>
178 <namespace key="15" case="first-letter">Category talk</namespace>
184 $available_pages =
array();
187 $available_pages[1] =
' <page>
188 <title>BackupDumperTestP1</title>
193 <timestamp>2012-04-01T16:46:05Z</timestamp>
197 <comment>BackupDumperTestP1Summary1</comment>
198 <sha1>0bolhl6ol7i6x0e7yq91gxgaan39j87</sha1>
199 <text xml:space="preserve">BackupDumperTestP1Text1</text>
200 <model name="wikitext">1</model>
201 <format mime="text/x-wiki">1</format>
206 $available_pages[2] =
' <page>
207 <title>BackupDumperTestP2</title>
212 <timestamp>2012-04-01T16:46:05Z</timestamp>
216 <comment>BackupDumperTestP2Summary1</comment>
217 <sha1>jprywrymfhysqllua29tj3sc7z39dl2</sha1>
218 <text xml:space="preserve">BackupDumperTestP2Text1</text>
219 <model name="wikitext">1</model>
220 <format mime="text/x-wiki">1</format>
224 <parentid>2</parentid>
225 <timestamp>2012-04-01T16:46:05Z</timestamp>
229 <comment>BackupDumperTestP2Summary4 extra</comment>
230 <sha1>6o1ciaxa6pybnqprmungwofc4lv00wv</sha1>
231 <text xml:space="preserve">BackupDumperTestP2Text4 some additional Text</text>
232 <model name="wikitext">1</model>
233 <format mime="text/x-wiki">1</format>
238 $available_pages[4] =
' <page>
239 <title>Talk:BackupDumperTestP1</title>
244 <timestamp>2012-04-01T16:46:05Z</timestamp>
248 <comment>Talk BackupDumperTestP1 Summary1</comment>
249 <sha1>nktofwzd0tl192k3zfepmlzxoax1lpe</sha1>
250 <model name="wikitext">1</model>
251 <format mime="text/x-wiki">1</format>
252 <text xml:space="preserve">Talk about BackupDumperTestP1 Text1</text>
258 $tail =
'</mediawiki>
263 foreach ( $requested_pages
as $i ) {
264 $this->assertTrue( array_key_exists( $i, $available_pages ),
265 "Check for availability of requested page " . $i );
266 $content .= $available_pages[$i];
270 $this->assertEquals( strlen( $content ), file_put_contents(
271 $fname, $content ),
"Length of prepared prefetch" );
testSynchronizePageMiss()
setUpPrefetch( $requested_pages=array(1, 2, 4))
Constructs a temporary file that can be used for prefetching.
Readahead helper for making large MediaWiki data dumps; reads in a previous XML dump to sequentially ...
testSynchronizePageMissAtStart()
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
testSequentialAcrossFiles()
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
testSynchronizeSkipAcrossFile()
BaseDump $dump
the BaseDump instance used within a test.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
testSynchronizeMissInWholeFirstFile()
testSynchronizeRevisionMissToRevision()
testSynchronizeRevisionMissToPage()
assertPrefetchEquals( $expected, $page, $revision)
asserts that a prefetch yields an expected string
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
testSynchronizeRevisionMissAtStart()