Unset all globals unneeded for unit tests, assert correct directory
authorAmir Sarabadani <Ladsgroup@gmail.com>
Mon, 8 Jul 2019 13:25:31 +0000 (15:25 +0200)
committerKosta Harlan <kharlan@wikimedia.org>
Tue, 9 Jul 2019 18:09:29 +0000 (14:09 -0400)
commitd23af35764bc7a5f223852d25baf554f1ae8f944
tree30d698ba3a77380094e99b5feabae3f1025d9123
parent434015880aab5b155cc7edd6fcddf1883d0395eb
Unset all globals unneeded for unit tests, assert correct directory

* Unset globals to avoid tests that look like unit tests but actually rely on
  globals
* move some tests out of unit directory so that the test suite will pass.
* Assert that tests which extend MediaWikiUnitTestCase are in a directory with
  "/unit/" in its path name

Depends-On: I67b37b1bde94eaa3d4298d9bd98ac57995ce93b9
Depends-On: I90921679518ee95fe393f8b1bbd9134daf0ba032
Bug: T87781
Change-Id: I16691fc8ac063705ba0c2bc63b96c4534ca8660b
17 files changed:
tests/phpunit/MediaWikiUnitTestCase.php
tests/phpunit/includes/MediaWikiVersionFetcherTest.php [new file with mode: 0644]
tests/phpunit/includes/Revision/RevisionStoreFactoryTest.php [new file with mode: 0644]
tests/phpunit/includes/config/ConfigFactoryTest.php [new file with mode: 0644]
tests/phpunit/includes/media/SVGMetadataExtractorTest.php [new file with mode: 0644]
tests/phpunit/includes/parser/SanitizerTest.php
tests/phpunit/includes/site/CachingSiteStoreTest.php [new file with mode: 0644]
tests/phpunit/includes/site/HashSiteStoreTest.php [new file with mode: 0644]
tests/phpunit/languages/SpecialPageAliasTest.php [deleted file]
tests/phpunit/unit/includes/MediaWikiVersionFetcherTest.php [deleted file]
tests/phpunit/unit/includes/Revision/RevisionStoreFactoryTest.php [deleted file]
tests/phpunit/unit/includes/config/ConfigFactoryTest.php [deleted file]
tests/phpunit/unit/includes/media/SVGMetadataExtractorTest.php [deleted file]
tests/phpunit/unit/includes/parser/SanitizerUnitTest.php
tests/phpunit/unit/includes/site/CachingSiteStoreTest.php [deleted file]
tests/phpunit/unit/includes/site/HashSiteStoreTest.php [deleted file]
tests/phpunit/unit/languages/SpecialPageAliasTest.php [new file with mode: 0644]