* Unit tests don't work with external PHPUnit anymore, Composer is now the only supported
way. Run `composer install` to install it and other dev dependencies to run unit tests.
* wl_id field added to the watchlist table.
+* Revision::getRawText() was removed (deprecated since 1.21).
== Compatibility ==
Most importantly, the following functions have been deprecated:
-* Revisions::getText() and Revisions::getRawText() is deprecated in favor Revisions::getContent()
+* Revisions::getText() is deprecated in favor Revisions::getContent()
* WikiPage::getText() is deprecated in favor WikiPage::getContent()
Also, the old Article::getContent() (which returns text) is superceded by Article::getContentObject(). However, both
}
}
- /**
- * Fetch revision text without regard for view restrictions
- *
- * @return string
- *
- * @deprecated since 1.21. Instead, use Revision::getContent( Revision::RAW )
- * or Revision::getSerializedData() as appropriate.
- */
- public function getRawText() {
- ContentHandler::deprecated( __METHOD__, "1.21" );
- return $this->getText( self::RAW );
- }
-
/**
* Fetch original serialized data without regard for view restrictions
*
$this->assertEquals( 'hello hello.', $rev->getContent()->getNativeData() );
}
- /**
- * @covers Revision::getRawText
- */
- public function testGetRawText() {
- $this->hideDeprecated( 'Revision::getRawText' );
-
- $orig = $this->makeRevision( [ 'text' => 'hello hello raw.' ] );
- $rev = Revision::newFromId( $orig->getId() );
-
- $this->assertEquals( 'hello hello raw.', $rev->getRawText() );
- }
-
/**
* @covers Revision::getContentModel
*/
$this->assertEquals( $expectedText, $rev->getText( $audience ) );
}
- /**
- * @group Database
- * @dataProvider dataGetText
- * @covers Revision::getRawText
- */
- public function testGetRawText( $text, $title, $model, $format, $audience, $expectedText ) {
- $this->hideDeprecated( 'Revision::getRawText' );
-
- $rev = $this->newTestRevision( $text, $title, $model, $format );
-
- $this->assertEquals( $expectedText, $rev->getRawText( $audience ) );
- }
-
public function dataGetSize() {
return [
[ "hello world.", CONTENT_MODEL_WIKITEXT, 12 ],