- function dataGetText() {
- // NOTE: we expect the help namespace to always contain wikitext
- return [
- [ 'hello world', 'Help:Hello', null, null, Revision::FOR_PUBLIC, 'hello world' ],
- [ serialize( 'hello world' ), 'Hello', "testing", null, Revision::FOR_PUBLIC, null ],
- [ serialize( 'hello world' ), 'Dummy:Hello', null, null, Revision::FOR_PUBLIC, null ],
- ];
- }
-
- /**
- * @group Database
- * @dataProvider dataGetText
- * @covers Revision::getText
- */
- public function testGetText( $text, $title, $model, $format, $audience, $expectedText ) {
- $this->hideDeprecated( 'Revision::getText' );
-
- $rev = $this->newTestRevision( $text, $title, $model, $format );
-
- $this->assertEquals( $expectedText, $rev->getText( $audience ) );
- }
-