MediaWiki
REL1_31
MediaWikiTestCaseSchema2Test.php
Go to the documentation of this file.
1
<?php
2
15
class
MediaWikiTestCaseSchema2Test
extends
MediaWikiTestCase
{
16
17
public
function
testMediaWikiTestCaseSchemaTestOrder
() {
18
// The first test must have run before this one
19
$this->assertTrue(
MediaWikiTestCaseSchema1Test::$hasRun
);
20
}
21
22
public
function
testCreatedTableWasRemoved
() {
23
// Make sure MediaWikiTestCaseTestTable created by MediaWikiTestCaseSchema1Test
24
// was dropped before executing MediaWikiTestCaseSchema2Test.
25
$this->assertFalse( $this->db->tableExists(
'MediaWikiTestCaseTestTable'
) );
26
}
27
28
public
function
testDroppedTableWasRestored
() {
29
// Make sure oldimage that was dropped by MediaWikiTestCaseSchema1Test
30
// was restored before executing MediaWikiTestCaseSchema2Test.
31
$this->assertTrue( $this->db->tableExists(
'oldimage'
) );
32
}
33
34
public
function
testOverridenTableWasRestored
() {
35
// Make sure imagelinks overwritten by MediaWikiTestCaseSchema1Test
36
// was restored to the original schema before executing MediaWikiTestCaseSchema2Test.
37
$this->assertTrue( $this->db->tableExists(
'imagelinks'
) );
38
$this->assertFalse( $this->db->fieldExists(
'imagelinks'
,
'il_frobnitz'
) );
39
}
40
41
public
function
testAlteredTableWasRestored
() {
42
// Make sure pagelinks altered by MediaWikiTestCaseSchema1Test
43
// was restored to the original schema before executing MediaWikiTestCaseSchema2Test.
44
$this->assertTrue( $this->db->tableExists(
'pagelinks'
) );
45
$this->assertFalse( $this->db->fieldExists(
'pagelinks'
,
'pl_frobnitz'
) );
46
}
47
48
}
MediaWikiTestCaseSchema1Test\$hasRun
static $hasRun
Definition
MediaWikiTestCaseSchema1Test.php:12
MediaWikiTestCaseSchema2Test
MediaWikiTestCase.
Definition
MediaWikiTestCaseSchema2Test.php:15
MediaWikiTestCaseSchema2Test\testMediaWikiTestCaseSchemaTestOrder
testMediaWikiTestCaseSchemaTestOrder()
Definition
MediaWikiTestCaseSchema2Test.php:17
MediaWikiTestCaseSchema2Test\testDroppedTableWasRestored
testDroppedTableWasRestored()
Definition
MediaWikiTestCaseSchema2Test.php:28
MediaWikiTestCaseSchema2Test\testCreatedTableWasRemoved
testCreatedTableWasRemoved()
Definition
MediaWikiTestCaseSchema2Test.php:22
MediaWikiTestCaseSchema2Test\testAlteredTableWasRestored
testAlteredTableWasRestored()
Definition
MediaWikiTestCaseSchema2Test.php:41
MediaWikiTestCaseSchema2Test\testOverridenTableWasRestored
testOverridenTableWasRestored()
Definition
MediaWikiTestCaseSchema2Test.php:34
MediaWikiTestCase
Definition
MediaWikiTestCase.php:17
tests
phpunit
tests
MediaWikiTestCaseSchema2Test.php
Generated on Mon Nov 25 2024 15:36:45 for MediaWiki by
1.10.0