Go to file
Bartosz Dziewoński 1c3fada1fb Make CommentUtilsTest a proper unit test
Documentation:
https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Writing_unit_tests_for_extensions#Two_types_of_tests

We can do this because the tested methods do not depend on any globals
or on MediaWiki being installed.

In addition to being the new hotness, MediaWikiUnitTestCase allows the
test classes that use it instead of MediaWikiTestCase to start up much
faster. In my testing, running this test case individually now takes
0.35s, compared to 1.1s before.

Try:
* With new code:
  time php tests/phpunit/phpunit.php extensions/DiscussionTools/tests/phpunit/unit/CommentUtilsTest.php
* With old code:
  time php tests/phpunit/phpunit.php extensions/DiscussionTools/tests/phpunit/CommentUtilsTest.php

Change-Id: I771b1f3d101a394ee869e42547d9ae7839397752
2021-02-02 15:37:17 +01:00
.phan build: Add mediawiki/mediawiki-phan-config 2020-06-10 22:21:07 +02:00
i18n Merge "Update localisation messages and their documentation for new discussion tool" 2021-02-02 12:12:45 +00:00
images Add beta feature preference 2020-02-21 15:20:48 +00:00
includes Move Hooks to HookUtils 2021-02-01 22:35:11 +00:00
maintenance Defensive use of dynamic paths in maintenance script 2020-02-20 19:51:07 +01:00
modules Merge "Update warning about missing topic title immediately" 2021-02-02 12:11:21 +00:00
tests Make CommentUtilsTest a proper unit test 2021-02-02 15:37:17 +01:00
.eslintrc.json build: Update devDependencies 2020-06-09 19:42:05 +01:00
.gitignore Remove extra blank line from .gitignore file 2020-08-31 15:24:56 +01:00
.gitreview Add .gitreview 2019-10-09 21:18:34 +00:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 32.0.0 2020-10-29 10:53:01 +00:00
.stylelintrc.json Stylelint: Enforce class prefixes 2020-12-23 16:47:55 +00:00
CODE_OF_CONDUCT.md build: Updating npm dependencies 2020-01-09 06:43:15 +00:00
composer.json build: Updating dependencies 2021-01-29 09:54:58 +00:00
COPYING Add required files for an extension 2019-10-10 19:42:56 +01:00
extension.json Make CommentUtilsTest a proper unit test 2021-02-02 15:37:17 +01:00
Gruntfile.js build: Update devDependencies 2020-06-09 19:42:05 +01:00
package-lock.json build: Updating dependencies 2021-01-29 09:54:58 +00:00
package.json build: Updating dependencies 2021-01-29 09:54:58 +00:00