[TASK] Introduce base class for PHPUnit tests
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 21 Sep 2012 14:14:33 +0000 (16:14 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 22 Sep 2012 21:33:37 +0000 (23:33 +0200)
commit538a04a8f78d8b7b66b8ffbb8bb68a850fa0dfb3
tree83aadb4e338c0f91ec832f039a109776b72c1813
parent65fe560bc02698ddebcd48c2d4d346ae61ba81f3
[TASK] Introduce base class for PHPUnit tests

Previously all core unit tests extended from the
Tx_PhpUnit_TestCase. This turned out to be problematic
because the core tests relied on the behaviour of that
class and we could not easily change behaviour centrally
for the core tests.
Because of that, we introduced several own base test classes
which added functionality for specific test cases.

With introducing a new base test case class which is
extended by all core test, we can consolidate helper
functions and specific wanted behaviour like blacklisting
TYPO3_DB globals for all tests.

Additionally all tests will benefit from
future enhancements in the base class.

Resolves: #41171
Releases: 6.0

Change-Id: Ic9e5c4b128ffb81cc9228e080a9d4a7909ee9dcd
Reviewed-on: http://review.typo3.org/14836
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
119 files changed:
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
typo3/sysext/backend/Tests/Unit/Module/ModuleControllerTest.php
typo3/sysext/backend/Tests/Unit/Sprite/SpriteManagerTest.php
typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php
typo3/sysext/backend/Tests/Unit/Tree/SortedTreeNodeCollectionTest.php
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeTest.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php
typo3/sysext/belog/Tests/Unit/Domain/Repository/HistoryEntryRepositoryTest.php
typo3/sysext/core/Tests/AccessibleObjectInterface.php [new file with mode: 0644]
typo3/sysext/core/Tests/BaseTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Category/Collection/CategoryCollectionTest.php
typo3/sysext/core/Tests/FunctionalTestCase.php [new file with mode: 0644]
typo3/sysext/core/Tests/Integrity/IntegrityTest.php
typo3/sysext/core/Tests/Legacy/t3lib/class.t3lib_formmailTest.php
typo3/sysext/core/Tests/Legacy/typo3/contrib/class.removexssTest.php
typo3/sysext/core/Tests/Unit/Authentication/AbstractUserAuthenticationTest.php
typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/AbstractBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/ApcBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/DbBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/FileBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/MemcachedBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/PdoBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/RedisBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/TransientMemoryBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/WincacheBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php
typo3/sysext/core/Tests/Unit/Cache/FactoryTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/AbstractFrontendTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/PhpFrontendTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/StringFrontendTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/VariableFrontendTest.php
typo3/sysext/core/Tests/Unit/Category/CategoryRegistryTest.php
typo3/sysext/core/Tests/Unit/Category/Collection/CategoryCollectionTest.php
typo3/sysext/core/Tests/Unit/Charset/CharsetConverterTest.php
typo3/sysext/core/Tests/Unit/Collection/RecordCollectionRepositoryTest.php
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php
typo3/sysext/core/Tests/Unit/Core/ClassLoaderTest.php
typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/core/Tests/Unit/Database/DatabaseConnectionTest.php
typo3/sysext/core/Tests/Unit/Database/PreparedStatementTest.php
typo3/sysext/core/Tests/Unit/Database/SqlParserTest.php
typo3/sysext/core/Tests/Unit/Encoder/JavaScriptEncoderTest.php
typo3/sysext/core/Tests/Unit/Error/DebugExceptionHandlerTest.php
typo3/sysext/core/Tests/Unit/Error/ProductionExceptionHandlerTest.php
typo3/sysext/core/Tests/Unit/Extension/ExtensionManagerTest.php
typo3/sysext/core/Tests/Unit/FormProtection/AbstractFormProtectionTest.php
typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php
typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php
typo3/sysext/core/Tests/Unit/FormProtection/InstallToolFormProtectionTest.php
typo3/sysext/core/Tests/Unit/Html/RteHtmlParserTest.php
typo3/sysext/core/Tests/Unit/Localization/Parser/LocallangXmlParserTest.php
typo3/sysext/core/Tests/Unit/Localization/Parser/XliffParserTest.php
typo3/sysext/core/Tests/Unit/Locking/LockerTest.php
typo3/sysext/core/Tests/Unit/Log/LogLevelTest.php
typo3/sysext/core/Tests/Unit/Log/LogManagerTest.php
typo3/sysext/core/Tests/Unit/Log/LogRecordTest.php
typo3/sysext/core/Tests/Unit/Log/LoggerTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/AbstractMemoryTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/AbstractTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/IntrospectionTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/MemoryPeakUsageTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/MemoryUsageTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/ProcessorTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/WebTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/AbstractTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/DatabaseTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/FileTest.php
typo3/sysext/core/Tests/Unit/Mail/MailerTest.php
typo3/sysext/core/Tests/Unit/Mail/SwiftMailerAdapterTest.php
typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php
typo3/sysext/core/Tests/Unit/RegistryTest.php
typo3/sysext/core/Tests/Unit/Resource/BaseTestCase.php
typo3/sysext/core/Tests/Unit/Resource/Driver/DriverRegistryTest.php
typo3/sysext/core/Tests/Unit/Resource/FactoryTest.php
typo3/sysext/core/Tests/Unit/Resource/FileTest.php
typo3/sysext/core/Tests/Unit/Resource/FolderTest.php
typo3/sysext/core/Tests/Unit/Resource/Repository/AbstractRepositoryTest.php
typo3/sysext/core/Tests/Unit/Resource/Service/IndexerServiceTest.php
typo3/sysext/core/Tests/Unit/Resource/Utility/FileExtensionFilterTest.php
typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/ClientUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/File/ExtendedFileUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/HttpUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/MailUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/MathUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/PathUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/RootlineUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/StringUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/VersionNumberUtilityTest.php
typo3/sysext/core/Tests/UnitTestCase.php [new file with mode: 0644]
typo3/sysext/extbase
typo3/sysext/extensionmanager/Tests/Unit/Controller/UpdateFromTerControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ConfigurationItemRepositoryTest.php
typo3/sysext/felogin/Tests/Unit/Controller/FrontendLoginControllerTest.php
typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php
typo3/sysext/frontend/Tests/Unit/Page/CacheHashCalculatorTest.php
typo3/sysext/frontend/Tests/Unit/Page/PageRepositoryTest.php
typo3/sysext/frontend/Tests/Unit/View/AdminPanelViewTest.php
typo3/sysext/indexed_search/Tests/Unit/IndexerTest.php
typo3/sysext/install/Tests/Unit/InstallToolTest.php
typo3/sysext/integrity/Tests/Unit/Utility/ArrayBrowserTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/BlowfishSaltTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/Md5SaltTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/PhpassSaltTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/SaltFactoryTest.php
typo3/sysext/saltedpasswords/Tests/Unit/Utility/SaltedPasswordsUtilityTest.php
typo3/sysext/scheduler/Tests/Unit/Controller/SchedulerModuleControllerTest.php
typo3/sysext/scheduler/Tests/Unit/CronCommand/CronCommandTest.php
typo3/sysext/scheduler/Tests/Unit/CronCommand/NormalizeCommandTest.php
typo3/sysext/scheduler/Tests/Unit/Task/CachingFrameworkGarbageCollectionTest.php