mediawiki-extensions-Cite/tests/phpunit/CiteHooksTest.php
Adam Wight a176e22097 Remove ApiQueryReferences support
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
2019-11-28 11:08:46 +01:00

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 );
}
}