From eb27449d7064b7c1120bd9059cd698ff7512bda4 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sat, 24 Mar 2018 18:21:54 +0100 Subject: [PATCH] Fix phpcs exclude rules Change-Id: Ia39e6189d666af7d6fe1ccd14e8e7cae277a4428 --- .phpcs.xml | 5 +---- extension.json | 3 ++- ...{CookieWarning.hooks.php => CookieWarningHooks.php} | 0 ...arning.hooksTest.php => CookieWarningHooksTest.php} | 6 ------ tests/phpunit/includes/CookieWarningTestTemplate.php | 10 ++++++++++ 5 files changed, 13 insertions(+), 11 deletions(-) rename includes/{CookieWarning.hooks.php => CookieWarningHooks.php} (100%) rename tests/phpunit/includes/{CookieWarning.hooksTest.php => CookieWarningHooksTest.php} (98%) create mode 100644 tests/phpunit/includes/CookieWarningTestTemplate.php diff --git a/.phpcs.xml b/.phpcs.xml index 409e85f..3839d78 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,9 +1,6 @@ - - - - + . diff --git a/extension.json b/extension.json index e8f65f3..e68d4a2 100644 --- a/extension.json +++ b/extension.json @@ -127,7 +127,8 @@ "remoteExtPath": "CookieWarning" }, "AutoloadClasses": { - "CookieWarningHooks": "includes/CookieWarning.hooks.php", + "CookieWarningHooks": "includes/CookieWarningHooks.php", + "CookieWarningTestTemplate": "tests/phpunit/includes/CookieWarningTestTemplate.php", "GeoLocation": "includes/GeoLocation.php" }, "ConfigRegistry": { diff --git a/includes/CookieWarning.hooks.php b/includes/CookieWarningHooks.php similarity index 100% rename from includes/CookieWarning.hooks.php rename to includes/CookieWarningHooks.php diff --git a/tests/phpunit/includes/CookieWarning.hooksTest.php b/tests/phpunit/includes/CookieWarningHooksTest.php similarity index 98% rename from tests/phpunit/includes/CookieWarning.hooksTest.php rename to tests/phpunit/includes/CookieWarningHooksTest.php index e7e46af..e1e4ad3 100644 --- a/tests/phpunit/includes/CookieWarning.hooksTest.php +++ b/tests/phpunit/includes/CookieWarningHooksTest.php @@ -176,9 +176,3 @@ class CookieWarningHooksTest extends MediaWikiLangTestCase { $instance->setAccessible( false ); } } - -class CookieWarningTestTemplate extends BaseTemplate { - public function execute() { - return; - } -} diff --git a/tests/phpunit/includes/CookieWarningTestTemplate.php b/tests/phpunit/includes/CookieWarningTestTemplate.php new file mode 100644 index 0000000..c021a0e --- /dev/null +++ b/tests/phpunit/includes/CookieWarningTestTemplate.php @@ -0,0 +1,10 @@ +