Page MenuHomeWickedGov Phorge

HooksTest.php
No OneTemporary

Size
980 B
Referenced Files
None
Subscribers
None

HooksTest.php

<?php
namespace MediaWiki\Extension\VisualEditor\Tests;
use MediaWiki\Config\HashConfig;
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 = [];
( new Hooks() )->onResourceLoaderGetConfigVars( $vars, '', new HashConfig() );
$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() {
yield [ [], [] ];
// TODO: test a lot more config!
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Aug 19, 02:07 (2 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b3/a7/3c5c3d3549c0b46b911170b3fae0
Default Alt Text
HooksTest.php (980 B)

Event Timeline