MediaWiki  master
MediaWikiUnitTestCase Class Reference

Base class for unit tests. More...

Inherits TestCase.

Inherited by ArrayDiffFormatterTest, ArticleTest, AvroValidatorTest, ChangesListFilterGroupTest, ClassCollectorTest, CommandFactoryTest, ComposerVersionNormalizerTest, DerivativeRequestTest, DifferenceEngineSlotDiffRendererTest, DiffOpTest, DiffTest, EtcdConfigTest, ExtensionProcessorTest, FauxResponseTest, FileBackendDBRepoWrapperTest, FiltersTest, FirejailCommandTest, ForeignDBFileTest, ForeignTitleTest, FormatJsonTest, FormatJsonUnitTest, FormOptionsInitializationTest, FormOptionsTest, GIFMetadataExtractorTest, HashConfigTest, HTMLCheckMatrixTest, HttpUnitTest, InstallDocFormatterTest, InterwikiLookupAdapterTest, IPTCTest, JpegMetadataExtractorTest, JsonContentHandlerTest, LanguageCodeTest, LicensesTest, MediaHandlerTest, MediaWiki\Auth\AuthenticationResponseTest, MediaWiki\Edit\PreparedEditTest, MediaWiki\Logger\Monolog\AvroFormatterTest, MediaWiki\Logger\Monolog\CeeFormatterTest, MediaWiki\Logger\Monolog\KafkaHandlerTest, MediaWiki\Logger\Monolog\LineFormatterTest, MediaWiki\Logger\Monolog\LogstashFormatterTest, MediaWiki\Logger\MonologSpiTest, MediaWiki\Session\MetadataMergeExceptionTest, MediaWiki\Session\SessionIdTest, MediaWiki\Session\SessionUnitTest, MediaWiki\Session\TokenTest, MediaWiki\Tests\Rest\EntryPointTest, MediaWiki\Tests\Rest\Handler\HelloHandlerTest, MediaWiki\Tests\Rest\HeaderContainerTest, MediaWiki\Tests\Rest\PathTemplateMatcher\PathMatcherTest, MediaWiki\Tests\Rest\ResponseFactoryTest, MediaWiki\Tests\Rest\RouterTest, MediaWiki\Tests\Rest\StringStreamTest, MediaWiki\Tests\Revision\FallbackSlotRoleHandlerTest, MediaWiki\Tests\Revision\MainSlotRoleHandlerTest, MediaWiki\Tests\Revision\SlotRecordTest, MediaWiki\Tests\Revision\SlotRoleHandlerTest, MediaWikiPageNameNormalizerTest, MemcachedBagOStuffTest, MultiConfigTest, MWCallableUpdateTest, MWCryptHashTest, MWExceptionHandlerTest, MWRestrictionsTest, NamespaceAwareForeignTitleFactoryTest, NoWriteWatchedItemStoreUnitTest, PasswordFactoryTest, PasswordTest, PathRouterTest, RedisBagOStuffTest, RemexDriverTest, ReplicatedBagOStuffTest, ResourceLoaderFilePathTest, RESTBagOStuffTest, SanitizerUnitTest, SanitizerValidateEmailTest, SearchIndexFieldTest, SearchSuggestionSetTest, ServiceOptionsTest, ServiceWiringTest, SiteConfigurationTest, SiteExporterTest, SiteImporterTest, SkinFactoryTest, SlotDiffRendererTest, SpecialPageAliasTest, TidyTest, TitleArrayFromResultTest, TitleValueTest, TransactionRoundDefiningUpdateTest, UserArrayFromResultTest, VersionCheckerTest, WfAppendQueryTest, WfArrayPlus2dTest, WfAssembleUrlTest, WfBaseNameTest, WfEscapeShellArgTest, WfGetCallerTest, WfRemoveDotSegmentsTest, WfShorthandToIntegerTest, WfStringToBoolTest, WfTimestampTest, WfUrlencodeTest, WikiReferenceTest, XmlJsTest, XmlSelectTest, and ZipDirectoryReaderTest.

Collaboration diagram for MediaWikiUnitTestCase:

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

 $unitGlobals = []
 

Detailed Description

Base class for unit tests.

Extend this class if you are testing classes which use dependency injection and do not access global functions, variables, services or a storage backend.

Definition at line 30 of file MediaWikiUnitTestCase.php.

Member Function Documentation

◆ setUp()

MediaWikiUnitTestCase::setUp ( )
protected

Definition at line 36 of file MediaWikiUnitTestCase.php.

References $GLOBALS, $value, and as.

◆ tearDown()

MediaWikiUnitTestCase::tearDown ( )
protected

Definition at line 53 of file MediaWikiUnitTestCase.php.

References $GLOBALS, and $unitGlobals.

Member Data Documentation

◆ $unitGlobals

MediaWikiUnitTestCase::$unitGlobals = []
private

Definition at line 34 of file MediaWikiUnitTestCase.php.

Referenced by tearDown().


The documentation for this class was generated from the following file: