HooksTest: Covers Hooks::callHook too
Change-Id: Id2b97b031b2fcf82a6fba66dae353db1acf340c3
This commit is contained in:
parent
dbad540cd3
commit
91a1a3ba2f
1 changed files with 6 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
* @dataProvider provideHooks
|
* @dataProvider provideHooks
|
||||||
* @covers Hooks::register
|
* @covers Hooks::register
|
||||||
* @covers Hooks::run
|
* @covers Hooks::run
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testNewStyleHooks( $msg, $hook, $expectedFoo, $expectedBar ) {
|
public function testNewStyleHooks( $msg, $hook, $expectedFoo, $expectedBar ) {
|
||||||
$foo = $bar = 'original';
|
$foo = $bar = 'original';
|
||||||
|
|
@ -85,6 +86,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
* @covers Hooks::register
|
* @covers Hooks::register
|
||||||
* @covers Hooks::getHandlers
|
* @covers Hooks::getHandlers
|
||||||
* @covers Hooks::run
|
* @covers Hooks::run
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testNewStyleHookInteraction() {
|
public function testNewStyleHookInteraction() {
|
||||||
global $wgHooks;
|
global $wgHooks;
|
||||||
|
|
@ -124,6 +126,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
/**
|
/**
|
||||||
* @expectedException MWException
|
* @expectedException MWException
|
||||||
* @covers Hooks::run
|
* @covers Hooks::run
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testUncallableFunction() {
|
public function testUncallableFunction() {
|
||||||
Hooks::register( 'MediaWikiHooksTest001', 'ThisFunctionDoesntExist' );
|
Hooks::register( 'MediaWikiHooksTest001', 'ThisFunctionDoesntExist' );
|
||||||
|
|
@ -132,6 +135,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Hooks::run
|
* @covers Hooks::run
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testFalseReturn() {
|
public function testFalseReturn() {
|
||||||
Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
|
Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
|
||||||
|
|
@ -149,6 +153,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Hooks::runWithoutAbort
|
* @covers Hooks::runWithoutAbort
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testRunWithoutAbort() {
|
public function testRunWithoutAbort() {
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
@ -171,6 +176,7 @@ class HooksTest extends MediaWikiTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Hooks::runWithoutAbort
|
* @covers Hooks::runWithoutAbort
|
||||||
|
* @covers Hooks::callHook
|
||||||
*/
|
*/
|
||||||
public function testRunWithoutAbortWarning() {
|
public function testRunWithoutAbortWarning() {
|
||||||
Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
|
Hooks::register( 'MediaWikiHooksTest001', function ( &$foo ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue