mediawiki-extensions-Visual.../tests/phpunit/integration/HooksTest.php
Derick Alangi f2bb8cf45d Remove VirtualRESTService code from VisualEditor
This follows the event of VE no longer using RESTBase anything. All
actions related to stashing and Parsoid and now handled in MW core.

Bug: T339227
Change-Id: I50b20ed5abb721a6ac8987cac37a6f395a4816dc
2023-07-11 19:38:05 +02:00

37 lines
895 B
PHP

<?php
namespace MediaWiki\Extension\VisualEditor\Tests;
use MediaWiki\Extension\VisualEditor\Hooks;
use MediaWikiIntegrationTestCase;
/**
* @covers \MediaWiki\Extension\VisualEditor\Hooks
* @group Database
*/
class HooksTest extends MediaWikiIntegrationTestCase {
/**
* @dataProvider provideOnResourceLoaderGetConfigVars
*/
public function testOnResourceLoaderGetConfigVars( array $config, array $expected ) {
$this->overrideConfigValues( $config );
$vars = [];
Hooks::onResourceLoaderGetConfigVars( $vars );
$this->assertArrayHasKey( 'wgVisualEditorConfig', $vars );
$veConfig = $vars['wgVisualEditorConfig'];
foreach ( $expected as $name => $value ) {
$this->assertArrayHasKey( $name, $veConfig );
$this->assertSame( $value, $veConfig[$name] );
}
}
public static function provideOnResourceLoaderGetConfigVars() {
// TODO: test a lot more config!
}
}