Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git] / tests / phpunit / includes / TitleMethodsTest.php
index abd70b2..77d6f59 100644 (file)
@@ -437,6 +437,31 @@ class TitleMethodsTest extends MediaWikiLangTestCase {
                $this->assertSame( $expected, $title->getLinkURL( $query, $query2, $proto ) );
        }
 
+       /**
+        * Integration test to catch regressions like T74870. Taken and modified
+        * from SemanticMediaWiki
+        *
+        * @covers Title::moveTo
+        */
+       public function testTitleMoveCompleteIntegrationTest() {
+               $this->hideDeprecated( 'Title::moveTo' );
+
+               $oldTitle = Title::newFromText( 'Help:Some title' );
+               WikiPage::factory( $oldTitle )->doEditContent( new WikitextContent( 'foo' ), 'bar' );
+               $newTitle = Title::newFromText( 'Help:Some other title' );
+               $this->assertNull(
+                       WikiPage::factory( $newTitle )->getRevision()
+               );
+
+               $this->assertTrue( $oldTitle->moveTo( $newTitle, false, 'test1', true ) );
+               $this->assertNotNull(
+                       WikiPage::factory( $oldTitle )->getRevision()
+               );
+               $this->assertNotNull(
+                       WikiPage::factory( $newTitle )->getRevision()
+               );
+       }
+
        function tearDown() {
                Title::clearCaches();
                parent::tearDown();