Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / tests / phpunit / tests / MediaWikiTestCaseSchema2Test.php
1 <?php
2
3 /**
4 * @covers MediaWikiTestCase
5 *
6 * @group Database
7 * @group MediaWikiTestCaseTest
8 *
9 * This test is intended to be executed AFTER MediaWikiTestCaseSchema1Test to ensure
10 * that any schema modifications have been cleaned up between test cases.
11 * As there seems to be no way to force execution order, we currently rely on
12 * test classes getting run in anpha-numerical order.
13 */
14 class MediaWikiTestCaseSchema2Test extends MediaWikiTestCase {
15
16 public function testSchemaExtension() {
17 // Make sure MediaWikiTestCaseTestTable created by MediaWikiTestCaseSchema1Test
18 // was dropped before executing MediaWikiTestCaseSchema2Test.
19 $this->assertFalse( $this->db->tableExists( 'MediaWikiTestCaseTestTable' ) );
20 }
21
22 public function testSchemaOverride() {
23 // Make sure imagelinks modified by MediaWikiTestCaseSchema1Test
24 // was restored to the original schema before executing MediaWikiTestCaseSchema2Test.
25 $this->assertTrue( $this->db->tableExists( 'imagelinks' ) );
26 $this->assertFalse( $this->db->fieldExists( 'imagelinks', 'il_frobniz' ) );
27 }
28
29 }