aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/content/TextContentTest.php
diff options
context:
space:
mode:
authorRoman Stolar <roman.stolar@speedandfunction.com>2021-10-14 17:01:58 +0300
committerRoman Stolar <roman.stolar@speedandfunction.com>2021-10-20 12:11:24 +0300
commitfa5237eb48a3c755797f0dce878e14c6fa8d40ff (patch)
tree34d22a7bb1a7bb4b8106da9886a8bc968103bbed /tests/phpunit/includes/content/TextContentTest.php
parent2ae3e55f6432bf97b95e49b6ad7e20b461f33d59 (diff)
downloadmediawikicore-fa5237eb48a3c755797f0dce878e14c6fa8d40ff.tar.gz
mediawikicore-fa5237eb48a3c755797f0dce878e14c6fa8d40ff.zip
Replace Content::getParserOutput call to ContentRenderer::getParserOutput
Bug: T287158 Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
Diffstat (limited to 'tests/phpunit/includes/content/TextContentTest.php')
-rw-r--r--tests/phpunit/includes/content/TextContentTest.php47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/phpunit/includes/content/TextContentTest.php b/tests/phpunit/includes/content/TextContentTest.php
index 8602f69af7a4..b11c0c1a72fd 100644
--- a/tests/phpunit/includes/content/TextContentTest.php
+++ b/tests/phpunit/includes/content/TextContentTest.php
@@ -44,53 +44,6 @@ class TextContentTest extends MediaWikiLangTestCase {
return new TextContent( $text );
}
- public static function dataGetParserOutput() {
- return [
- [
- 'TextContentTest_testGetParserOutput',
- CONTENT_MODEL_TEXT,
- "hello ''world'' & [[stuff]]\n", "hello ''world'' &amp; [[stuff]]",
- [
- 'Links' => []
- ]
- ],
- // TODO: more...?
- ];
- }
-
- /**
- * @dataProvider dataGetParserOutput
- * @covers TextContent::getParserOutput
- */
- public function testGetParserOutput( $title, $model, $text, $expectedHtml,
- $expectedFields = null
- ) {
- $title = Title::newFromText( $title );
- $content = ContentHandler::makeContent( $text, $title, $model );
-
- $po = $content->getParserOutput( $title );
-
- $html = $po->getText();
- $html = preg_replace( '#<!--.*?-->#sm', '', $html ); // strip comments
-
- $this->assertEquals( $expectedHtml, trim( $html ) );
-
- if ( $expectedFields ) {
- foreach ( $expectedFields as $field => $exp ) {
- $getter = 'get' . ucfirst( $field );
- $v = $po->$getter();
-
- if ( is_array( $exp ) ) {
- $this->assertArrayEquals( $exp, $v );
- } else {
- $this->assertEquals( $exp, $v );
- }
- }
- }
-
- // TODO: assert more properties
- }
-
public static function dataGetRedirectTarget() {
return [
[ '#REDIRECT [[Test]]',