MediaWiki  REL1_22
BaseDumpTest Class Reference

Tests for BaseDump. More...

Inheritance diagram for BaseDumpTest:
Collaboration diagram for BaseDumpTest:

List of all members.

Public Member Functions

 testPageMissAtEnd ()
 testRevisionMissAtEnd ()
 testSequential ()
 testSequentialAcrossFiles ()
 testSynchronizeMissInWholeFirstFile ()
 testSynchronizePageMiss ()
 testSynchronizePageMissAtStart ()
 testSynchronizeRevisionMissAtStart ()
 testSynchronizeRevisionMissToPage ()
 testSynchronizeRevisionMissToRevision ()
 testSynchronizeSkipAcrossFile ()

Protected Member Functions

 tearDown ()

Private Member Functions

 assertPrefetchEquals ($expected, $page, $revision)
 asserts that a prefetch yields an expected string
 setUpPrefetch ($requested_pages=array(1, 2, 4))
 Constructs a temporary file that can be used for prefetching.

Private Attributes

BaseDump $dump = null
 the BaseDump instance used within a test.

Detailed Description

Tests for BaseDump.

Dump

Definition at line 10 of file backupPrefetchTest.php.


Member Function Documentation

BaseDumpTest::assertPrefetchEquals ( expected,
page,
revision 
) [private]

asserts that a prefetch yields an expected string

Parameters:
$expectedstring|null: the exepcted result of the prefetch
$pageint: the page number to prefetch the text for
$revisionint: the revision number to prefetch the text for

Definition at line 35 of file backupPrefetchTest.php.

Referenced by testPageMissAtEnd(), testRevisionMissAtEnd(), testSequential(), testSequentialAcrossFiles(), testSynchronizeMissInWholeFirstFile(), testSynchronizePageMiss(), testSynchronizePageMissAtStart(), testSynchronizeRevisionMissAtStart(), testSynchronizeRevisionMissToPage(), testSynchronizeRevisionMissToRevision(), and testSynchronizeSkipAcrossFile().

BaseDumpTest::setUpPrefetch ( requested_pages = array( 1, 2, 4 )) [private]

Constructs a temporary file that can be used for prefetching.

The temporary file is removed by DumpBackup upon tearDown.

Parameters:
$requested_pagesArray The indices of the page parts that should go into the prefetch file. 1,2,4 are available.
Returns:
String The file name of the created temporary file

Definition at line 148 of file backupPrefetchTest.php.

Referenced by testPageMissAtEnd(), testRevisionMissAtEnd(), testSequential(), testSequentialAcrossFiles(), testSynchronizeMissInWholeFirstFile(), testSynchronizePageMiss(), testSynchronizePageMissAtStart(), testSynchronizeRevisionMissAtStart(), testSynchronizeRevisionMissToPage(), testSynchronizeRevisionMissToRevision(), and testSynchronizeSkipAcrossFile().

BaseDumpTest::tearDown ( ) [protected]

Reimplemented from MediaWikiTestCase.

Definition at line 18 of file backupPrefetchTest.php.


Member Data Documentation

BaseDump BaseDumpTest::$dump = null [private]

the BaseDump instance used within a test.

If set, this BaseDump gets automatically closed in tearDown.

Definition at line 16 of file backupPrefetchTest.php.


The documentation for this class was generated from the following file: