setupEnv( $config, $data ); $title = MediaWikiServices::getInstance()->getTitleParser()->parseTitle( $title ); $threadItemSet = static::createParser( $data )->parse( $container, $title ); $pageInfo = TestingAccessWrapper::newFromClass( ApiDiscussionToolsPageInfo::class ); $threadItemsHtml = $pageInfo->getThreadItemsHtml( $threadItemSet ); // Optionally write updated content to the JSON files if ( getenv( 'DISCUSSIONTOOLS_OVERWRITE_TESTS' ) ) { static::overwriteJsonFile( $expectedPath, $threadItemsHtml ); } static::assertEquals( $expected, $threadItemsHtml, $name ); $processedThreads = []; } public function provideGetThreadItemsHtml(): array { return static::getJson( '../cases/threaditemshtml.json' ); } }