MediaWiki REL1_33
MediaWikiTestCaseSchema2Test.php
Go to the documentation of this file.
1<?php
2
16
17 public function setUp() {
18 parent::setUp();
19 // FIXME: fails under postgres
20 $this->markTestSkippedIfDbType( 'postgres' );
21 }
22
24 // The first test must have run before this one
26 }
27
28 public function testCreatedTableWasRemoved() {
29 // Make sure MediaWikiTestCaseTestTable created by MediaWikiTestCaseSchema1Test
30 // was dropped before executing MediaWikiTestCaseSchema2Test.
31 $this->assertFalse( $this->db->tableExists( 'MediaWikiTestCaseTestTable' ) );
32 }
33
34 public function testDroppedTableWasRestored() {
35 // Make sure oldimage that was dropped by MediaWikiTestCaseSchema1Test
36 // was restored before executing MediaWikiTestCaseSchema2Test.
37 $this->assertTrue( $this->db->tableExists( 'oldimage' ) );
38 }
39
41 // Make sure imagelinks overwritten by MediaWikiTestCaseSchema1Test
42 // was restored to the original schema before executing MediaWikiTestCaseSchema2Test.
43 $this->assertTrue( $this->db->tableExists( 'imagelinks' ) );
44 $this->assertFalse( $this->db->fieldExists( 'imagelinks', 'il_frobnitz' ) );
45 }
46
47 public function testAlteredTableWasRestored() {
48 // Make sure pagelinks altered by MediaWikiTestCaseSchema1Test
49 // was restored to the original schema before executing MediaWikiTestCaseSchema2Test.
50 $this->assertTrue( $this->db->tableExists( 'pagelinks' ) );
51 $this->assertFalse( $this->db->fieldExists( 'pagelinks', 'pl_frobnitz' ) );
52 }
53
54}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
markTestSkippedIfDbType( $type)
Skip the test if using the specified database type.