mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-04 19:38:16 +00:00
a176e22097
This API was never used in Wikimedia production, and would have caused performance problems. Removing the dead code will simplify our refactoring. Bug: T238195 Change-Id: I7088f257ec034c0d089e0abdaa5a739910598300
40 lines
853 B
PHP
40 lines
853 B
PHP
<?php
|
|
|
|
namespace Cite\Tests;
|
|
|
|
use ApiQuerySiteinfo;
|
|
use Cite\Hooks\CiteHooks;
|
|
|
|
/**
|
|
* @coversDefaultClass \Cite\Hooks\CiteHooks
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class CiteHooksTest extends \MediaWikiIntegrationTestCase {
|
|
|
|
/**
|
|
* @covers ::onResourceLoaderGetConfigVars
|
|
*/
|
|
public function testOnResourceLoaderGetConfigVars() {
|
|
$vars = [];
|
|
|
|
CiteHooks::onResourceLoaderGetConfigVars( $vars );
|
|
|
|
$this->assertArrayHasKey( 'wgCiteVisualEditorOtherGroup', $vars );
|
|
$this->assertArrayHasKey( 'wgCiteResponsiveReferences', $vars );
|
|
}
|
|
|
|
/**
|
|
* @covers ::onAPIQuerySiteInfoGeneralInfo
|
|
*/
|
|
public function testOnAPIQuerySiteInfoGeneralInfo() {
|
|
$api = $this->createMock( ApiQuerySiteinfo::class );
|
|
$data = [];
|
|
|
|
CiteHooks::onAPIQuerySiteInfoGeneralInfo( $api, $data );
|
|
|
|
$this->assertArrayHasKey( 'citeresponsivereferences', $data );
|
|
}
|
|
|
|
}
|