mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-04 18:58:37 +00:00
f2bb8cf45d
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
37 lines
895 B
PHP
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!
|
|
}
|
|
|
|
}
|