MediaWiki  REL1_24
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 BaseDump

Definition at line 11 of file backupPrefetchTest.php.


Member Function Documentation

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

asserts that a prefetch yields an expected string

Parameters:
string | null$expectedThe exepcted result of the prefetch
int$pageThe page number to prefetch the text for
int$revisionThe revision number to prefetch the text for

Definition at line 36 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:
array$requested_pagesThe 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 19 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 17 of file backupPrefetchTest.php.


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