Merge "Revert "Declare visibility for class properties in MySQLMasterPos""
[lhc/web/wiklou.git] / tests / phpunit / includes / RevisionStorageTest.php
index 00b1f29..f69fad4 100644 (file)
@@ -38,7 +38,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
                                'iwlinks' ) );
        }
 
-       public function setUp() {
+       protected function setUp() {
                global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
 
                parent::setUp();
@@ -56,7 +56,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
                }
        }
 
-       public function tearDown() {
+       protected function tearDown() {
                global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
 
                parent::tearDown();
@@ -170,7 +170,6 @@ class RevisionStorageTest extends MediaWikiTestCase {
                $this->assertRevEquals( $orig, $rev );
        }
 
-
        /**
         * @covers Revision::newFromArchiveRow
         */
@@ -298,17 +297,6 @@ class RevisionStorageTest extends MediaWikiTestCase {
                $this->assertEquals( 'hello hello.', $rev->getContent()->getNativeData() );
        }
 
-       /**
-        * @covers Revision::revText
-        */
-       public function testRevText() {
-               $this->hideDeprecated( 'Revision::revText' );
-               $orig = $this->makeRevision( array( 'text' => 'hello hello rev.' ) );
-               $rev = Revision::newFromId( $orig->getId() );
-
-               $this->assertEquals( 'hello hello rev.', $rev->revText() );
-       }
-
        /**
         * @covers Revision::getRawText
         */
@@ -456,15 +444,15 @@ class RevisionStorageTest extends MediaWikiTestCase {
         * @dataProvider provideUserWasLastToEdit
         */
        public function testUserWasLastToEdit( $sinceIdx, $expectedLast ) {
-               $userA = \User::newFromName( "RevisionStorageTest_userA" );
-               $userB = \User::newFromName( "RevisionStorageTest_userB" );
+               $userA = User::newFromName( "RevisionStorageTest_userA" );
+               $userB = User::newFromName( "RevisionStorageTest_userB" );
 
                if ( $userA->getId() === 0 ) {
-                       $userA = \User::createNew( $userA->getName() );
+                       $userA = User::createNew( $userA->getName() );
                }
 
                if ( $userB->getId() === 0 ) {
-                       $userB = \User::createNew( $userB->getName() );
+                       $userB = User::createNew( $userB->getName() );
                }
 
                $ns = $this->getDefaultWikitextNS();
@@ -475,6 +463,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
                // create revisions -----------------------------
                $page = WikiPage::factory( Title::newFromText(
                        'RevisionStorageTest_testUserWasLastToEdit', $ns ) );
+               $page->insertOn( $dbw );
 
                # zero
                $revisions[0] = new Revision( array(