2023-01-10 22:16:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
|
|
|
|
use ApiTestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @group medium
|
|
|
|
* @group Database
|
|
|
|
*/
|
|
|
|
class ApiParseDiscussionToolsTest extends ApiTestCase {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers \MediaWiki\Extension\DiscussionTools\CommentFormatter::addDiscussionTools
|
|
|
|
*/
|
|
|
|
public function testApiParseSections() {
|
2023-01-26 19:25:23 +00:00
|
|
|
$this->markTestSkipped( 'T328072' );
|
|
|
|
|
2023-01-10 22:16:59 +00:00
|
|
|
$params = [
|
|
|
|
'action' => 'parse',
|
|
|
|
'title' => 'Talk:Test',
|
|
|
|
'uselang' => 'en',
|
|
|
|
'text' => "__FORCETOC__\n== foo ==\nbar ~~~~",
|
|
|
|
'pst' => 1,
|
|
|
|
'prop' => 'sections',
|
|
|
|
];
|
|
|
|
|
|
|
|
[ $result, ] = $this->doApiRequest( $params );
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
'<span class="ext-discussiontools-init-sidebar-meta">1 comment</span>',
|
|
|
|
$result['parse']['sections'][0]['extensionData']['DiscussionTools-html-summary']
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|