mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-02 20:16:41 +00:00
ff77db5ef4
Bug: T328072 Change-Id: I6613cb8c2673be82ccd030639015bb626b2fe21b
37 lines
782 B
PHP
37 lines
782 B
PHP
<?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() {
|
|
$this->markTestSkipped( 'T328072' );
|
|
|
|
$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']
|
|
);
|
|
}
|
|
|
|
}
|