-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHookHandler.php
More file actions
41 lines (36 loc) · 1.11 KB
/
HookHandler.php
File metadata and controls
41 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace PubSubHubbubSubscriber;
use DatabaseUpdater;
use WikiImporter;
class HookHandler {
/**
* Called when MediaWiki is updated to allow extensions to update the database.
*
* @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
*
* @codeCoverageIgnore
* @param DatabaseUpdater $updater The updater to use.
* @return bool
*/
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater ) {
$sqlPath = __DIR__ . "/../sql/";
$updater->addExtensionTable( 'push_subscriptions',
$sqlPath . "create_pushsubscriptions.sql" );
$updater->addExtensionIndex( 'push_subscriptions', 'psb_topic',
$sqlPath . "create_pushsubscriptions_index_topic.sql" );
return true;
}
/**
* Called when building a list of files with PHPUnit tests.
*
* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
*
* @codeCoverageIgnore
* @param string[] $files The list of test files.
* @return bool
*/
public static function onUnitTestsList( &$files ) {
$files = array_merge( $files, glob( __DIR__ . '/../tests/phpunit/*Test.php' ) );
return true;
}
}