summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/tests/phpunit/HookDocTest.php')
-rw-r--r--MLEB/Translate/tests/phpunit/HookDocTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/MLEB/Translate/tests/phpunit/HookDocTest.php b/MLEB/Translate/tests/phpunit/HookDocTest.php
index 616a6a53..94ee8af4 100644
--- a/MLEB/Translate/tests/phpunit/HookDocTest.php
+++ b/MLEB/Translate/tests/phpunit/HookDocTest.php
@@ -8,7 +8,7 @@
* @license GPL-2.0-or-later
*/
-class HookDocTest extends MediaWikiTestCase {
+class HookDocTest extends MediaWikiIntegrationTestCase {
protected $documented = [];
protected $used = [];
protected $paths = [
@@ -29,7 +29,7 @@ class HookDocTest extends MediaWikiTestCase {
],
];
- protected function setUp() {
+ protected function setUp() : void {
parent::setUp();
$contents = file_get_contents( __DIR__ . '/../../hooks.txt' );
$blocks = preg_split( '/\n\n/', $contents );
@@ -73,7 +73,7 @@ class HookDocTest extends MediaWikiTestCase {
protected static function getJSHooksFromFile( $file ) {
$content = file_get_contents( $file );
$m = [];
- preg_match_all( '/\bmw\.translateHooks\.run\(\s*[\'"]([^\'"]+)/', $content, $m );
+ preg_match_all( '/\bmw\.hook\(\s*[\'"]([^\'"]+)[\'"]\s*\).fire\(/', $content, $m );
$hooks = [];
foreach ( $m[1] as $hook ) {
$hooks[$hook] = [];