From 6102e5d8be4c3c6602d9d25765de9ad38c81929a Mon Sep 17 00:00:00 2001 From: Nikita Hovratov <nikita.h@live.de> Date: Mon, 28 Nov 2022 21:47:27 +0100 Subject: [PATCH] [TASK] Replace `['dummy']` array in getAccessibleMock calls with null Resolves: #99216 Releases: main Change-Id: I1d0e92fb5b5fbf91d873c8b5e8a6d313e1bea517 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76850 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Controller/Page/TreeControllerTest.php | 2 +- .../Controller/EditDocumentControllerTest.php | 6 ++-- .../SiteConfigurationControllerTest.php | 4 +-- .../Controller/SwitchUserControllerTest.php | 2 +- .../Wizard/SuggestWizardControllerTest.php | 4 +-- .../Unit/Form/InlineStackProcessorTest.php | 2 +- .../Cache/Backend/FileBackendTest.php | 16 ++++----- .../Unit/Cache/Backend/ApcuBackendTest.php | 2 +- .../Tests/Unit/Cache/CacheManagerTest.php | 10 +++--- .../ConfigurationManagerTest.php | 4 +-- .../Loader/YamlFileLoaderTest.php | 2 +- .../Unit/Console/CommandRegistryTest.php | 4 +-- .../Core/SystemEnvironmentBuilderTest.php | 2 +- .../Unit/DataHandling/DataHandlerTest.php | 2 +- .../Unit/Database/Query/QueryBuilderTest.php | 2 +- .../Unit/Locking/FileLockStrategyTest.php | 2 +- .../Tests/Unit/Locking/LockFactoryTest.php | 2 +- .../Unit/Locking/SimpleLockStrategyTest.php | 8 ++--- .../Tests/Unit/Package/PackageManagerTest.php | 2 +- .../core/Tests/Unit/Page/PageRendererTest.php | 14 ++++---- .../Tests/Unit/Resource/FileReferenceTest.php | 2 +- .../Unit/Resource/ResourceFactoryTest.php | 2 +- .../Utility/FileExtensionFilterTest.php | 2 +- .../Service/DependencyOrderingServiceTest.php | 4 +-- .../Parser/TypoScriptParserTest.php | 2 +- .../Tests/Unit/Utility/CommandUtilityTest.php | 6 ++-- .../ExtensionManagementUtilityTest.php | 2 +- .../Mvc/Controller/ActionControllerTest.php | 6 ++-- ...ropertyMappingConfigurationServiceTest.php | 6 ++-- .../Tests/Unit/Mvc/View/JsonViewTest.php | 8 ++--- .../Unit/Mvc/Web/Routing/UriBuilderTest.php | 14 ++++---- .../Unit/Persistence/Generic/BackendTest.php | 6 ++-- .../Generic/Mapper/DataMapFactoryTest.php | 16 ++++----- .../Generic/Mapper/DataMapperTest.php | 14 ++++---- .../Generic/PersistenceManagerTest.php | 2 +- .../Persistence/Generic/QueryResultTest.php | 4 +-- .../Storage/Typo3DbQueryParserTest.php | 32 ++++++++--------- .../Tests/Unit/Persistence/RepositoryTest.php | 6 ++-- .../UploadExtensionFileControllerTest.php | 2 +- .../Repository/ExtensionRepositoryTest.php | 6 ++-- .../Unit/Parser/ExtensionXmlParserTest.php | 2 +- .../Unit/Utility/DependencyUtilityTest.php | 10 +++--- .../Unit/Utility/FileHandlingUtilityTest.php | 4 +-- .../Validation/RedirectUrlValidatorTest.php | 2 +- .../Unit/View/AbstractTemplateViewTest.php | 2 +- .../Controller/FormEditorControllerTest.php | 4 +-- .../ConfigurationServiceTest.php | 4 +-- .../FormDefinitionValidationServiceTest.php | 12 +++---- .../Domain/Factory/ArrayFormFactoryTest.php | 4 +-- .../Domain/Finishers/ClosureFinisherTest.php | 2 +- .../Renderable/RenderableVariantTest.php | 2 +- .../Unit/Mvc/Configuration/YamlSourceTest.php | 4 +-- .../FormPersistenceManagerTest.php | 24 ++++++------- .../FormDefinitionArrayConverterTest.php | 2 +- .../Unit/Service/TranslationServiceTest.php | 36 +++++++++---------- .../ContentObject/ImageContentObjectTest.php | 4 +-- .../Tests/Unit/Http/RequestHandlerTest.php | 4 +-- .../Unit/Middleware/SiteResolverTest.php | 2 +- .../Unit/Typolink/LinkVarsCalculatorTest.php | 2 +- .../Unit/Typolink/PageLinkBuilderTest.php | 2 +- .../Export/ExportPageTreeViewTest.php | 2 +- .../impexp/Tests/Functional/ImportTest.php | 22 ++++++------ typo3/sysext/impexp/Tests/Unit/ExportTest.php | 2 +- .../SysRedirectRootPageMoveMigrationTest.php | 2 +- .../WorkspaceNewPlaceholderRemovalTest.php | 2 +- .../Unit/FolderStructure/AbstractNodeTest.php | 20 +++++------ .../FolderStructure/DirectoryNodeTest.php | 12 +++---- .../Unit/FolderStructure/FileNodeTest.php | 20 +++++------ .../Unit/FolderStructure/LinkNodeTest.php | 10 +++--- .../FolderStructure/StructureFacadeTest.php | 4 +-- .../Unit/Service/CoreUpdateServiceTest.php | 8 ++--- .../Unit/Service/CoreVersionServiceTest.php | 2 +- .../Database/QueryGeneratorTest.php | 28 +++++++-------- .../Unit/Database/QueryGeneratorTest.php | 2 +- 74 files changed, 249 insertions(+), 249 deletions(-) diff --git a/typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php b/typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php index ce1f04761bcc..975f7ef07e97 100644 --- a/typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php +++ b/typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php @@ -75,7 +75,7 @@ class TreeControllerTest extends FunctionalTestCase // Regular editor, non admin $this->backendUser = $this->setUpBackendUser(9); $this->context = GeneralUtility::makeInstance(Context::class); - $this->subject = $this->getAccessibleMock(TreeController::class, ['dummy']); + $this->subject = $this->getAccessibleMock(TreeController::class, null); } protected function tearDown(): void diff --git a/typo3/sysext/backend/Tests/Unit/Controller/EditDocumentControllerTest.php b/typo3/sysext/backend/Tests/Unit/Controller/EditDocumentControllerTest.php index fc3a96b68526..5ded55956067 100644 --- a/typo3/sysext/backend/Tests/Unit/Controller/EditDocumentControllerTest.php +++ b/typo3/sysext/backend/Tests/Unit/Controller/EditDocumentControllerTest.php @@ -32,7 +32,7 @@ class EditDocumentControllerTest extends UnitTestCase { $GLOBALS['TCA'][$tableName]['columns'] = $configuration; - $editDocumentControllerMock = $this->getAccessibleMock(EditDocumentController::class, ['dummy'], [], '', false); + $editDocumentControllerMock = $this->getAccessibleMock(EditDocumentController::class, null, [], '', false); $editDocumentControllerMock->_set('columnsOnly', $selectedFields); $queryParams = [ 'edit' => [ @@ -125,7 +125,7 @@ class EditDocumentControllerTest extends UnitTestCase $table = 'pages'; $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] = 'l10n_parent'; - $mock = $this->getAccessibleMock(EditDocumentController::class, ['dummy'], [], '', false); + $mock = $this->getAccessibleMock(EditDocumentController::class, null, [], '', false); $result = $mock->_call('resolvePreviewRecordId', $table, $recordArray, $previewConfiguration); self::assertSame($expected, $result); } @@ -157,7 +157,7 @@ class EditDocumentControllerTest extends UnitTestCase $recordArray = ['uid' => 2]; $table = 'dummy_table'; - $mock = $this->getAccessibleMock(EditDocumentController::class, ['dummy'], [], '', false); + $mock = $this->getAccessibleMock(EditDocumentController::class, null, [], '', false); $result = $mock->_call('resolvePreviewRecordId', $table, $recordArray, $previewConfiguration); self::assertSame($expected, $result); } diff --git a/typo3/sysext/backend/Tests/Unit/Controller/SiteConfigurationControllerTest.php b/typo3/sysext/backend/Tests/Unit/Controller/SiteConfigurationControllerTest.php index 25792f1eafb1..d7e94fdcc75d 100644 --- a/typo3/sysext/backend/Tests/Unit/Controller/SiteConfigurationControllerTest.php +++ b/typo3/sysext/backend/Tests/Unit/Controller/SiteConfigurationControllerTest.php @@ -28,7 +28,7 @@ class SiteConfigurationControllerTest extends UnitTestCase */ public function duplicateEntryPointsAreRecognized(): void { - $mockedSiteConfigurationController = $this->getAccessibleMock(SiteConfigurationController::class, ['dummy'], [], '', false); + $mockedSiteConfigurationController = $this->getAccessibleMock(SiteConfigurationController::class, null, [], '', false); $sites = [ new Site('site-1', 1, [ @@ -132,7 +132,7 @@ class SiteConfigurationControllerTest extends UnitTestCase */ public function languageBaseVariantsAreKept(): void { - $mockedSiteConfigurationController = $this->getAccessibleMock(SiteConfigurationController::class, ['dummy'], [], '', false); + $mockedSiteConfigurationController = $this->getAccessibleMock(SiteConfigurationController::class, null, [], '', false); $currentSiteConfig = [ 'base' => '//domain1.tld/', diff --git a/typo3/sysext/backend/Tests/Unit/Controller/SwitchUserControllerTest.php b/typo3/sysext/backend/Tests/Unit/Controller/SwitchUserControllerTest.php index 9fb367f6ed27..e386af1e1b18 100644 --- a/typo3/sysext/backend/Tests/Unit/Controller/SwitchUserControllerTest.php +++ b/typo3/sysext/backend/Tests/Unit/Controller/SwitchUserControllerTest.php @@ -42,7 +42,7 @@ class SwitchUserControllerTest extends UnitTestCase $GLOBALS['BE_USER']->uc = [ 'recentSwitchedToUsers' => [], ]; - $this->subject = $this->getAccessibleMock(SwitchUserController::class, ['dummy'], [], '', false); + $this->subject = $this->getAccessibleMock(SwitchUserController::class, null, [], '', false); } /** diff --git a/typo3/sysext/backend/Tests/Unit/Controller/Wizard/SuggestWizardControllerTest.php b/typo3/sysext/backend/Tests/Unit/Controller/Wizard/SuggestWizardControllerTest.php index 4f3e068f356e..ada4ed3a6606 100644 --- a/typo3/sysext/backend/Tests/Unit/Controller/Wizard/SuggestWizardControllerTest.php +++ b/typo3/sysext/backend/Tests/Unit/Controller/Wizard/SuggestWizardControllerTest.php @@ -117,7 +117,7 @@ class SuggestWizardControllerTest extends UnitTestCase */ public function isTableHiddenIsProperlyRetrieved(bool $expected, array $array): void { - $subject = $this->getAccessibleMock(SuggestWizardController::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(SuggestWizardController::class, null, [], '', false); self::assertEquals($expected, $subject->_call('isTableHidden', $array)); } @@ -138,7 +138,7 @@ class SuggestWizardControllerTest extends UnitTestCase */ public function whereClauseIsProperlyRetrieved(string $expected, array $array): void { - $subject = $this->getAccessibleMock(SuggestWizardController::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(SuggestWizardController::class, null, [], '', false); self::assertEquals($expected, $subject->_call('getWhereClause', $array)); } diff --git a/typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php b/typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php index cba0e495c3c4..de446b8849ef 100644 --- a/typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php +++ b/typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php @@ -263,7 +263,7 @@ class InlineStackProcessorTest extends UnitTestCase */ public function initializeByParsingDomObjectIdStringParsesStructureString(string $string, array $expectedInlineStructure, array $_): void { - $subject = $this->getAccessibleMock(InlineStackProcessor::class, ['dummy']); + $subject = $this->getAccessibleMock(InlineStackProcessor::class, null); $subject->initializeByParsingDomObjectIdString($string); $structure = $subject->_get('inlineStructure'); self::assertEquals($expectedInlineStructure, $structure); diff --git a/typo3/sysext/core/Tests/Functional/Cache/Backend/FileBackendTest.php b/typo3/sysext/core/Tests/Functional/Cache/Backend/FileBackendTest.php index 5f4037e52223..b7a42e40f793 100644 --- a/typo3/sysext/core/Tests/Functional/Cache/Backend/FileBackendTest.php +++ b/typo3/sysext/core/Tests/Functional/Cache/Backend/FileBackendTest.php @@ -54,7 +54,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsAbsolutePathWithoutTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('/tmp/foo'); self::assertEquals('/tmp/foo/', $subject->_get('temporaryCacheDirectory')); } @@ -64,7 +64,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsAbsolutePathWithTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('/tmp/foo/'); self::assertEquals('/tmp/foo/', $subject->_get('temporaryCacheDirectory')); } @@ -74,7 +74,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsRelativePathWithoutTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('tmp/foo'); $path = Environment::getProjectPath(); self::assertEquals($path . '/tmp/foo/', $subject->_get('temporaryCacheDirectory')); @@ -85,7 +85,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsRelativePathWithTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('tmp/foo/'); $path = Environment::getProjectPath(); self::assertEquals($path . '/tmp/foo/', $subject->_get('temporaryCacheDirectory')); @@ -96,7 +96,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsRelativeDottedPathWithoutTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('../tmp/foo'); $path = Environment::getProjectPath(); self::assertEquals($path . '/../tmp/foo/', $subject->_get('temporaryCacheDirectory')); @@ -107,7 +107,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsRelativeDottedPathWithTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('../tmp/foo/'); $path = Environment::getProjectPath(); self::assertEquals($path . '/../tmp/foo/', $subject->_get('temporaryCacheDirectory')); @@ -118,7 +118,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsAbsoluteDottedPathWithoutTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('/tmp/../foo'); self::assertEquals('/tmp/../foo/', $subject->_get('temporaryCacheDirectory')); } @@ -128,7 +128,7 @@ class FileBackendTest extends FunctionalTestCase */ public function setCacheDirectoryAllowsAbsoluteDottedPathWithTrailingSlash(): void { - $subject = $this->getAccessibleMock(FileBackend::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FileBackend::class, null, [], '', false); $subject->setCacheDirectory('/tmp/../foo/'); self::assertEquals('/tmp/../foo/', $subject->_get('temporaryCacheDirectory')); } diff --git a/typo3/sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php b/typo3/sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php index 374f6dec1a75..7dfe77af01e6 100644 --- a/typo3/sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php +++ b/typo3/sysext/core/Tests/Unit/Cache/Backend/ApcuBackendTest.php @@ -275,7 +275,7 @@ class ApcuBackendTest extends UnitTestCase { $cache = $this->createMock(FrontendInterface::class); if ($accessible) { - $backend = $this->getAccessibleMock(ApcuBackend::class, ['dummy'], ['Testing']); + $backend = $this->getAccessibleMock(ApcuBackend::class, null, ['Testing']); } else { $backend = new ApcuBackend('Testing'); } diff --git a/typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php b/typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php index 6e7cb745790c..fd1a92591fe0 100644 --- a/typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php +++ b/typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php @@ -319,7 +319,7 @@ class CacheManagerTest extends UnitTestCase */ public function getCacheCreatesCacheInstanceWithFallbackToDefaultFrontend(): void { - $manager = $this->getAccessibleMock(CacheManager::class, ['dummy'], [], '', false); + $manager = $this->getAccessibleMock(CacheManager::class, null, [], '', false); $cacheIdentifier = StringUtility::getUniqueId('Test'); $configuration = [ $cacheIdentifier => [ @@ -344,7 +344,7 @@ class CacheManagerTest extends UnitTestCase */ public function getCacheCreatesCacheInstanceWithFallbackToDefaultBackend(): void { - $manager = $this->getAccessibleMock(CacheManager::class, ['dummy'], [], '', false); + $manager = $this->getAccessibleMock(CacheManager::class, null, [], '', false); $cacheIdentifier = StringUtility::getUniqueId('Test'); $configuration = [ $cacheIdentifier => [ @@ -427,7 +427,7 @@ class CacheManagerTest extends UnitTestCase */ public function flushCachesInGroupByTagsWithEmptyTagsArrayDoesNotFlushCaches(): void { - $manager = $this->getAccessibleMock(CacheManager::class, ['dummy'], [], '', false); + $manager = $this->getAccessibleMock(CacheManager::class, null, [], '', false); $cacheIdentifier = 'aTest'; $cacheGroups = [ @@ -462,7 +462,7 @@ class CacheManagerTest extends UnitTestCase */ public function flushCachesInGroupByTagsDeletesByTag(): void { - $manager = $this->getAccessibleMock(CacheManager::class, ['dummy'], [], '', false); + $manager = $this->getAccessibleMock(CacheManager::class, null, [], '', false); $cacheIdentifier = 'aTest'; $cacheGroups = [ @@ -501,7 +501,7 @@ class CacheManagerTest extends UnitTestCase $this->expectException(\InvalidArgumentException::class); $this->expectExceptionCode(1596980032); - $manager = $this->getAccessibleMock(CacheManager::class, ['dummy']); + $manager = $this->getAccessibleMock(CacheManager::class, null); $manager->setCacheConfigurations([ '' => [ 'frontend' => VariableFrontend::class, diff --git a/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php b/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php index 1ee7dd9c907c..79d5262c030d 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php @@ -536,7 +536,7 @@ class ConfigurationManagerTest extends UnitTestCase */ public function isValidLocalConfigurationPathAcceptsAllowedPath(): void { - $subject = $this->getAccessibleMock(ConfigurationManager::class, ['dummy']); + $subject = $this->getAccessibleMock(ConfigurationManager::class, null); $subject->_set('allowedSettingsPaths', ['foo/bar']); self::assertTrue($subject->_call('isValidLocalConfigurationPath', 'foo/bar/baz')); } @@ -546,7 +546,7 @@ class ConfigurationManagerTest extends UnitTestCase */ public function isValidLocalConfigurationPathDeniesNotAllowedPath(): void { - $subject = $this->getAccessibleMock(ConfigurationManager::class, ['dummy']); + $subject = $this->getAccessibleMock(ConfigurationManager::class, null); $subject->_set('allowedSettingsPaths', ['foo/bar']); self::assertFalse($subject->_call('isValidLocalConfigurationPath', 'bar/baz')); } diff --git a/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php b/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php index c42218c050ea..406e7cfaca44 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/Loader/YamlFileLoaderTest.php @@ -200,7 +200,7 @@ betterthanbefore: \'%env(mynonexistingenv)%\' */ public function containsPlaceholderTest(mixed $placeholderValue, bool $expected): void { - $subject = $this->getAccessibleMock(YamlFileLoader::class, ['dummy']); + $subject = $this->getAccessibleMock(YamlFileLoader::class, null); $output = $subject->_call('containsPlaceholder', $placeholderValue); self::assertSame($expected, $output); } diff --git a/typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php b/typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php index efc2144eebb9..dfe408aa26ea 100644 --- a/typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php +++ b/typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php @@ -49,8 +49,8 @@ class CommandRegistryTest extends UnitTestCase */ public function iteratesLazyCommandsOfActivePackages(): void { - $command1MockClass = $this->getMockClass(Command::class, ['dummy']); - $command2MockClass = $this->getMockClass(Command::class, ['dummy']); + $command1MockClass = $this->getMockClass(Command::class, null); + $command2MockClass = $this->getMockClass(Command::class, null); $this->containerMock->method('get')->willReturnMap([ ['command1', new $command1MockClass()], diff --git a/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php b/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php index 75682a442eca..806e48135d8b 100644 --- a/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php +++ b/typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php @@ -34,7 +34,7 @@ class SystemEnvironmentBuilderTest extends UnitTestCase protected function setUp(): void { parent::setUp(); - $this->subject = $this->getAccessibleMock(SystemEnvironmentBuilder::class, ['dummy']); + $this->subject = $this->getAccessibleMock(SystemEnvironmentBuilder::class, null); } /** diff --git a/typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php b/typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php index dbfb5ea95f3c..39d3b9ff163c 100644 --- a/typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php +++ b/typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php @@ -68,7 +68,7 @@ class DataHandlerTest extends UnitTestCase $cacheFrontendProphecy = $this->prophesize(FrontendInterface::class); $cacheManagerProphecy->getCache('runtime')->willReturn($cacheFrontendProphecy->reveal()); $this->backEndUser = $this->createMock(BackendUserAuthentication::class); - $this->subject = $this->getAccessibleMock(DataHandler::class, ['dummy']); + $this->subject = $this->getAccessibleMock(DataHandler::class, null); $this->subject->start([], [], $this->backEndUser); } diff --git a/typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php b/typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php index 92b9157480dd..4dd1bcbb08bd 100644 --- a/typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php +++ b/typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php @@ -993,7 +993,7 @@ class QueryBuilderTest extends UnitTestCase $databasePlatformMock = $this->createMock($platform); $databasePlatformMock->method('getIdentifierQuoteCharacter')->willReturn($quoteChar); $connectionMock->method('getDatabasePlatform')->willReturn($databasePlatformMock); - $subject = $this->getAccessibleMock(QueryBuilder::class, ['dummy'], [$connectionMock]); + $subject = $this->getAccessibleMock(QueryBuilder::class, null, [$connectionMock]); $result = $subject->_call('unquoteSingleIdentifier', $input); self::assertEquals($expected, $result); } diff --git a/typo3/sysext/core/Tests/Unit/Locking/FileLockStrategyTest.php b/typo3/sysext/core/Tests/Unit/Locking/FileLockStrategyTest.php index 37af2a839333..90cacd191f92 100644 --- a/typo3/sysext/core/Tests/Unit/Locking/FileLockStrategyTest.php +++ b/typo3/sysext/core/Tests/Unit/Locking/FileLockStrategyTest.php @@ -42,7 +42,7 @@ class FileLockStrategyTest extends UnitTestCase */ public function constructorSetsFilePathToExpectedValue(): void { - $lock = $this->getAccessibleMock(FileLockStrategy::class, ['dummy'], ['999999999']); + $lock = $this->getAccessibleMock(FileLockStrategy::class, null, ['999999999']); self::assertSame(Environment::getVarPath() . '/' . FileLockStrategy::FILE_LOCK_FOLDER . 'flock_' . md5('999999999'), $lock->_get('filePath')); } diff --git a/typo3/sysext/core/Tests/Unit/Locking/LockFactoryTest.php b/typo3/sysext/core/Tests/Unit/Locking/LockFactoryTest.php index ec7eaf4efc97..d9065779f388 100644 --- a/typo3/sysext/core/Tests/Unit/Locking/LockFactoryTest.php +++ b/typo3/sysext/core/Tests/Unit/Locking/LockFactoryTest.php @@ -46,7 +46,7 @@ class LockFactoryTest extends UnitTestCase protected function setUp(): void { parent::setUp(); - $this->mockFactory = $this->getAccessibleMock(LockFactory::class, ['dummy']); + $this->mockFactory = $this->getAccessibleMock(LockFactory::class, null); // backup global configuration if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['strategies'])) { diff --git a/typo3/sysext/core/Tests/Unit/Locking/SimpleLockStrategyTest.php b/typo3/sysext/core/Tests/Unit/Locking/SimpleLockStrategyTest.php index ceb0778651ba..14a38e83d340 100644 --- a/typo3/sysext/core/Tests/Unit/Locking/SimpleLockStrategyTest.php +++ b/typo3/sysext/core/Tests/Unit/Locking/SimpleLockStrategyTest.php @@ -41,7 +41,7 @@ class SimpleLockStrategyTest extends UnitTestCase */ public function constructorSetsResourceToPathWithIdIfUsingSimpleLocking(): void { - $lock = $this->getAccessibleMock(SimpleLockStrategy::class, ['dummy'], ['999999999']); + $lock = $this->getAccessibleMock(SimpleLockStrategy::class, null, ['999999999']); self::assertSame(Environment::getVarPath() . '/' . SimpleLockStrategy::FILE_LOCK_FOLDER . 'simple_' . md5('999999999'), $lock->_get('filePath')); } @@ -54,7 +54,7 @@ class SimpleLockStrategyTest extends UnitTestCase self::markTestSkipped('Test not available on Windows.'); } // Use a very high id to be unique - $lock = $this->getAccessibleMock(SimpleLockStrategy::class, ['dummy'], ['999999999']); + $lock = $this->getAccessibleMock(SimpleLockStrategy::class, null, ['999999999']); $pathOfLockFile = $lock->_get('filePath'); @@ -73,7 +73,7 @@ class SimpleLockStrategyTest extends UnitTestCase */ public function releaseRemovesLockfileInTypo3TempLocks(): void { - $lock = $this->getAccessibleMock(SimpleLockStrategy::class, ['dummy'], ['999999999']); + $lock = $this->getAccessibleMock(SimpleLockStrategy::class, null, ['999999999']); $pathOfLockFile = $lock->_get('filePath'); @@ -109,7 +109,7 @@ class SimpleLockStrategyTest extends UnitTestCase self::markTestIncomplete('releaseDoesNotRemoveFilesNotWithinTypo3TempLocksDirectory() skipped: Test file could not be created'); } // Create instance, set lock file to invalid path - $lock = $this->getAccessibleMock(SimpleLockStrategy::class, ['dummy'], ['999999999']); + $lock = $this->getAccessibleMock(SimpleLockStrategy::class, null, ['999999999']); $lock->_set('filePath', $file); $lock->_set('isAcquired', true); diff --git a/typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php b/typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php index 3826289524e2..92c59f536abf 100644 --- a/typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php +++ b/typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php @@ -186,7 +186,7 @@ class PackageManagerTest extends UnitTestCase file_put_contents($packagePath . 'ext_emconf.php', '<?php' . LF . '$EM_CONF[$_EXTKEY] = [];'); } - $packageManager = $this->getAccessibleMock(PackageManager::class, ['dummy'], [new DependencyOrderingService()]); + $packageManager = $this->getAccessibleMock(PackageManager::class, null, [new DependencyOrderingService()]); $packageManager->_set('packagesBasePaths', $packagePaths); $packageManager->_set('packagesBasePath', $this->testRoot . 'Packages/'); $packageManager->_set('packageStatesPathAndFilename', $this->testRoot . 'Configuration/PackageStates.php'); diff --git a/typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php b/typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php index 06f0a10df934..23e5a1fb8176 100644 --- a/typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php +++ b/typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php @@ -59,7 +59,7 @@ class PageRendererTest extends UnitTestCase */ public function addBodyContentAddsContent(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $expectedReturnValue = 'ABCDE'; $subject->addBodyContent('A'); $subject->addBodyContent('B'); @@ -75,7 +75,7 @@ class PageRendererTest extends UnitTestCase */ public function addInlineLanguageLabelFileSetsInlineLanguageLabelFiles(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $fileReference = StringUtility::getUniqueId('file_'); $selectionPrefix = StringUtility::getUniqueId('prefix_'); $stripFromSelectionName = StringUtility::getUniqueId('strip_'); @@ -97,7 +97,7 @@ class PageRendererTest extends UnitTestCase */ public function addInlineLanguageLabelFileSetsTwoDifferentInlineLanguageLabelFiles(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $fileReference1 = StringUtility::getUniqueId('file1_'); $selectionPrefix1 = StringUtility::getUniqueId('prefix1_'); $stripFromSelectionName1 = StringUtility::getUniqueId('strip1_'); @@ -128,7 +128,7 @@ class PageRendererTest extends UnitTestCase */ public function addInlineLanguageLabelFileDoesNotSetSameLanguageFileTwice(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $fileReference = StringUtility::getUniqueId('file2_'); $selectionPrefix = StringUtility::getUniqueId('prefix2_'); $stripFromSelectionName = StringUtility::getUniqueId('strip2_'); @@ -146,7 +146,7 @@ class PageRendererTest extends UnitTestCase $this->expectException(\RuntimeException::class); $this->expectExceptionCode(1284906026); - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $subject->_call('includeLanguageFileForInline', 'someLLFile.xml'); } @@ -286,7 +286,7 @@ class PageRendererTest extends UnitTestCase */ public function parseLanguageLabelsForJavaScriptReturnsEmptyStringIfEmpty(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $inlineLanguageLabels = []; $subject->_set('inlineLanguageLabels', $inlineLanguageLabels); $actual = $subject->_call('parseLanguageLabelsForJavaScript'); @@ -298,7 +298,7 @@ class PageRendererTest extends UnitTestCase */ public function parseLanguageLabelsForJavaScriptReturnsFlatArray(): void { - $subject = $this->getAccessibleMock(PageRenderer::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageRenderer::class, null, [], '', false); $inlineLanguageLabels = [ 'key' => 'label', 'foo' => 'bar', diff --git a/typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php b/typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php index c41e5e08a109..f632d9dbede4 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php @@ -28,7 +28,7 @@ class FileReferenceTest extends UnitTestCase { protected function prepareFixture(array $fileReferenceProperties, array $originalFileProperties): FileReference&MockObject&AccessibleObjectInterface { - $fixture = $this->getAccessibleMock(FileReference::class, ['dummy'], [], '', false); + $fixture = $this->getAccessibleMock(FileReference::class, null, [], '', false); $originalFileMock = $this->getAccessibleMock(File::class, [], [], '', false); $originalFileMock ->method('getProperties') diff --git a/typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php b/typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php index 8316f7454cc8..b98a7d2c3327 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php @@ -41,7 +41,7 @@ class ResourceFactoryTest extends UnitTestCase protected function setUp(): void { parent::setUp(); - $this->subject = $this->getAccessibleMock(ResourceFactory::class, ['dummy'], [], '', false); + $this->subject = $this->getAccessibleMock(ResourceFactory::class, null, [], '', false); } /** diff --git a/typo3/sysext/core/Tests/Unit/Resource/Utility/FileExtensionFilterTest.php b/typo3/sysext/core/Tests/Unit/Resource/Utility/FileExtensionFilterTest.php index 0c631d6e3259..10d90d28a6ab 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/Utility/FileExtensionFilterTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/Utility/FileExtensionFilterTest.php @@ -71,7 +71,7 @@ class FileExtensionFilterTest extends UnitTestCase string $disallowedExtensions, bool $isAllowed ): void { - $filter = $this->getAccessibleMock(FileExtensionFilter::class, ['dummy']); + $filter = $this->getAccessibleMock(FileExtensionFilter::class, null); $filter->setAllowedFileExtensions($allowedExtensions); $filter->setDisallowedFileExtensions($disallowedExtensions); $result = $filter->_call('isAllowed', $fileExtension); diff --git a/typo3/sysext/core/Tests/Unit/Service/DependencyOrderingServiceTest.php b/typo3/sysext/core/Tests/Unit/Service/DependencyOrderingServiceTest.php index 5fa3ce5b5d8d..2d1230d2fa27 100644 --- a/typo3/sysext/core/Tests/Unit/Service/DependencyOrderingServiceTest.php +++ b/typo3/sysext/core/Tests/Unit/Service/DependencyOrderingServiceTest.php @@ -157,7 +157,7 @@ class DependencyOrderingServiceTest extends UnitTestCase */ public function prepareDependenciesBuildsFullIdentifierList(array $dependencies, array $expectedDependencies): void { - $dependencyOrderingService = $this->getAccessibleMock(DependencyOrderingService::class, ['dummy']); + $dependencyOrderingService = $this->getAccessibleMock(DependencyOrderingService::class, null); $preparedDependencies = $dependencyOrderingService->_call('prepareDependencies', $dependencies); self::assertEquals($expectedDependencies, $preparedDependencies); } @@ -685,7 +685,7 @@ class DependencyOrderingServiceTest extends UnitTestCase */ public function findPathInGraphReturnsCorrectPath(array $graph, string $from, string $to, array $expected): void { - $dependencyOrderingService = $this->getAccessibleMock(DependencyOrderingService::class, ['dummy']); + $dependencyOrderingService = $this->getAccessibleMock(DependencyOrderingService::class, null); $path = $dependencyOrderingService->_call('findPathInGraph', $graph, $from, $to); self::assertSame($expected, $path); diff --git a/typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php b/typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php index 0d43599fffcc..66c2ad83efb6 100644 --- a/typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php +++ b/typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php @@ -36,7 +36,7 @@ class TypoScriptParserTest extends UnitTestCase protected function setUp(): void { parent::setUp(); - $this->typoScriptParser = $this->getAccessibleMock(TypoScriptParser::class, ['dummy']); + $this->typoScriptParser = $this->getAccessibleMock(TypoScriptParser::class, null); } protected function tearDown(): void diff --git a/typo3/sysext/core/Tests/Unit/Utility/CommandUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/CommandUtilityTest.php index b1d13cd39fa8..99b1fe258c01 100644 --- a/typo3/sysext/core/Tests/Unit/Utility/CommandUtilityTest.php +++ b/typo3/sysext/core/Tests/Unit/Utility/CommandUtilityTest.php @@ -81,7 +81,7 @@ class CommandUtilityTest extends UnitTestCase public function getConfiguredApps($globalsBinSetup, $expected): void { $GLOBALS['TYPO3_CONF_VARS']['SYS']['binSetup'] = $globalsBinSetup; - $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, ['dummy']); + $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, null); $result = $commandUtilityMock->_call('getConfiguredApps'); self::assertSame($expected, $result); } @@ -195,7 +195,7 @@ class CommandUtilityTest extends UnitTestCase */ public function unQuoteFilenameUnquotesCorrectly(string $source, array $expectedQuoted): void { - $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, ['dummy']); + $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, null); $actualQuoted = $commandUtilityMock->_call('unQuoteFilenames', $source); self::assertEquals($expectedQuoted, $actualQuoted); } @@ -209,7 +209,7 @@ class CommandUtilityTest extends UnitTestCase */ public function getCommandWithPhpReturnsPathToPhpExecutable(): void { - $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, ['dummy']); + $commandUtilityMock = $this->getAccessibleMock(CommandUtility::class, null); $command = $commandUtilityMock->_call('getCommand', 'php'); self::assertIsString($command); diff --git a/typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php index fcc629b2a2db..d72eec12e100 100644 --- a/typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php +++ b/typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php @@ -1017,7 +1017,7 @@ class ExtensionManagementUtilityTest extends UnitTestCase */ public function executePositionedStringInsertionTrimsCorrectCharacters(string $string, string $expectedResult): void { - $extensionManagementUtility = $this->getAccessibleMock(ExtensionManagementUtility::class, ['dummy']); + $extensionManagementUtility = $this->getAccessibleMock(ExtensionManagementUtility::class, null); $string = $extensionManagementUtility->_call('executePositionedStringInsertion', $string, ''); self::assertEquals($expectedResult, $string); } diff --git a/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php b/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php index 44a410109f79..68dc858ac769 100644 --- a/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/ActionControllerTest.php @@ -273,7 +273,7 @@ class ActionControllerTest extends UnitTestCase */ public function setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath(array $configuration, array $expected): void { - $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']); + $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, []); $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class); $mockConfigurationManager->method('getConfiguration')->willReturn($configuration); $mockController->injectConfigurationManager($mockConfigurationManager); @@ -344,7 +344,7 @@ class ActionControllerTest extends UnitTestCase */ public function setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath(array $configuration, array $expected): void { - $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']); + $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, []); $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class); $mockConfigurationManager->method('getConfiguration')->willReturn($configuration); $mockController->injectConfigurationManager($mockConfigurationManager); @@ -415,7 +415,7 @@ class ActionControllerTest extends UnitTestCase */ public function setViewConfigurationResolvesPartialRootPathsForPartialRootPath(array $configuration, array $expected): void { - $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']); + $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, []); $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class); $mockConfigurationManager->method('getConfiguration')->willReturn($configuration); $mockController->injectConfigurationManager($mockConfigurationManager); diff --git a/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php b/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php index eb78cafbc229..5b3c61e3da3d 100644 --- a/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php @@ -165,7 +165,7 @@ class MvcPropertyMappingConfigurationServiceTest extends UnitTestCase ->getMock(); $hashService->expects(self::once())->method('appendHmac')->with(json_encode($formFieldArray))->willReturn(json_encode($formFieldArray) . $mockHash); - $requestHashService = $this->getAccessibleMock(MvcPropertyMappingConfigurationService::class, ['dummy']); + $requestHashService = $this->getAccessibleMock(MvcPropertyMappingConfigurationService::class, null); $requestHashService->injectHashService($hashService); $expected = json_encode($formFieldArray) . $mockHash; @@ -323,7 +323,7 @@ class MvcPropertyMappingConfigurationServiceTest extends UnitTestCase ->getMock(); $mockHashService->expects(self::once())->method('validateAndStripHmac')->with('fooTrustedProperties')->willReturn(json_encode($trustedProperties)); - $requestHashService = $this->getAccessibleMock(MvcPropertyMappingConfigurationService::class, ['dummy']); + $requestHashService = $this->getAccessibleMock(MvcPropertyMappingConfigurationService::class, null); $requestHashService->_set('hashService', $mockHashService); $mockArgument = $this->getAccessibleMock(Argument::class, ['getName'], [], '', false); @@ -333,7 +333,7 @@ class MvcPropertyMappingConfigurationServiceTest extends UnitTestCase $mockArgument->_set('propertyMappingConfiguration', $propertyMappingConfiguration); $mockArgument->method('getName')->willReturn('foo'); - $arguments = $this->getAccessibleMock(Arguments::class, ['dummy']); + $arguments = $this->getAccessibleMock(Arguments::class, null); $arguments->addNewArgument('foo'); $requestHashService->initializePropertyMappingConfigurationFromRequest($extbaseRequest, $arguments); diff --git a/typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php b/typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php index e69356727f58..d40b487e467e 100644 --- a/typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php @@ -177,7 +177,7 @@ class JsonViewTest extends UnitTestCase { GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata')); - $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false); + $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false); $actual = $jsonView->_call('transformValue', $object, $configuration); @@ -349,7 +349,7 @@ class JsonViewTest extends UnitTestCase { GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata')); - $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false); + $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false); $jsonView->_set('configuration', $configuration); $jsonView->_set('variablesToRender', [$variableToRender]); $jsonView->_call('assign', $variableToRender, $object); @@ -402,7 +402,7 @@ class JsonViewTest extends UnitTestCase ->disableOriginalConstructor() ->onlyMethods(['getIdentifierByObject']) ->getMock(); - $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false); + $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false); $jsonView->_set('persistenceManager', $persistenceManagerMock); $persistenceManagerMock->expects(self::once())->method('getIdentifierByObject')->with($object->value1)->willReturn($dummyIdentifier); @@ -468,7 +468,7 @@ class JsonViewTest extends UnitTestCase GeneralUtility::setSingletonInstance(ReflectionService::class, new ReflectionService(new NullFrontend('extbase'), 'ClassSchemata')); - $jsonView = $this->getAccessibleMock(JsonView::class, ['dummy'], [], '', false); + $jsonView = $this->getAccessibleMock(JsonView::class, null, [], '', false); $actual = $jsonView->_call('transformValue', $object, $configuration); self::assertSame($expected, $actual); } diff --git a/typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php b/typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php index 019dfb737f54..d9f98b066558 100644 --- a/typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php @@ -353,7 +353,7 @@ class UriBuilderTest extends UnitTestCase public function buildBackendUriConvertsDomainObjectsAfterArgumentsHaveBeenMerged(): void { $GLOBALS['TYPO3_REQUEST'] = $this->getRequestWithRouteAttribute(); - $mockDomainObject = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockDomainObject = $this->getAccessibleMock(AbstractEntity::class, null); $mockDomainObject->_set('uid', '123'); $this->uriBuilder->setArguments(['somePrefix' => ['someDomainObject' => $mockDomainObject]]); $expectedResult = '/typo3/test/Path?token=dummyToken&somePrefix%5BsomeDomainObject%5D=123'; @@ -560,9 +560,9 @@ class UriBuilderTest extends UnitTestCase */ public function buildTypolinkConfigurationConvertsDomainObjects(): void { - $mockDomainObject1 = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockDomainObject1 = $this->getAccessibleMock(AbstractEntity::class, null); $mockDomainObject1->_set('uid', '123'); - $mockDomainObject2 = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockDomainObject2 = $this->getAccessibleMock(AbstractEntity::class, null); $mockDomainObject2->_set('uid', '321'); $this->uriBuilder->setTargetPageUid(123); $this->uriBuilder->setArguments(['someDomainObject' => $mockDomainObject1, 'baz' => ['someOtherDomainObject' => $mockDomainObject2]]); @@ -680,9 +680,9 @@ class UriBuilderTest extends UnitTestCase */ public function convertDomainObjectsToIdentityArraysConvertsDomainObjects(): void { - $mockDomainObject1 = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockDomainObject1 = $this->getAccessibleMock(AbstractEntity::class, null); $mockDomainObject1->_set('uid', '123'); - $mockDomainObject2 = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockDomainObject2 = $this->getAccessibleMock(AbstractEntity::class, null); $mockDomainObject2->_set('uid', '321'); $expectedResult = ['foo' => ['bar' => 'baz'], 'domainObject1' => '123', 'second' => ['domainObject2' => '321']]; $actualResult = $this->uriBuilder->_call('convertDomainObjectsToIdentityArrays', ['foo' => ['bar' => 'baz'], 'domainObject1' => $mockDomainObject1, 'second' => ['domainObject2' => $mockDomainObject2]]); @@ -695,7 +695,7 @@ class UriBuilderTest extends UnitTestCase public function convertDomainObjectsToIdentityArraysConvertsObjectStoragesWithDomainObjects(): void { $objectStorage = new ObjectStorage(); - $mockChildObject1 = $this->getAccessibleMock(AbstractEntity::class, ['dummy']); + $mockChildObject1 = $this->getAccessibleMock(AbstractEntity::class, null); $mockChildObject1->_set('uid', '123'); $objectStorage->attach($mockChildObject1); $expectedResult = ['foo' => ['bar' => 'baz'], 'objectStorage' => ['123']]; @@ -726,7 +726,7 @@ class UriBuilderTest extends UnitTestCase $this->expectExceptionCode(1260881688); $mockEntity = new EntityFixture(); $mockEntity->name = 'foo'; - $mockUriBuilder = $this->getAccessibleMock(UriBuilder::class, ['dummy']); + $mockUriBuilder = $this->getAccessibleMock(UriBuilder::class, null); $mockUriBuilder->_call('convertDomainObjectsToIdentityArrays', ['object' => $mockEntity]); } diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php index bbdf9ab0a60f..d8a0c74c1d01 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php @@ -42,7 +42,7 @@ class BackendTest extends UnitTestCase public function insertRelationInRelationtableSetsMmMatchFieldsInRow(): void { /* \TYPO3\CMS\Extbase\Persistence\Generic\Backend|\PHPUnit\Framework\MockObject\MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface */ - $fixture = $this->getAccessibleMock(Backend::class, ['dummy'], [], '', false); + $fixture = $this->getAccessibleMock(Backend::class, null, [], '', false); /* \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper|\PHPUnit\Framework\MockObject\MockObject */ $dataMapFactory = $this->createMock(DataMapFactory::class); /* \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap|\PHPUnit\Framework\MockObject\MockObject */ @@ -105,7 +105,7 @@ class BackendTest extends UnitTestCase $session->expects(self::once())->method('getIdentifierByObject')->with($object)->willReturn($fakeUuid); - $backend = $this->getAccessibleMock(Backend::class, ['dummy'], [$configurationManager], '', false); + $backend = $this->getAccessibleMock(Backend::class, null, [$configurationManager], '', false); $backend->_set('session', $session); self::assertEquals($backend->getIdentifierByObject($object), $fakeUuid); @@ -132,7 +132,7 @@ class BackendTest extends UnitTestCase $proxy->expects(self::once())->method('_loadRealInstance')->willReturn($object); $session->expects(self::once())->method('getIdentifierByObject')->with($object)->willReturn($fakeUuid); - $backend = $this->getAccessibleMock(Backend::class, ['dummy'], [$configurationManager], '', false); + $backend = $this->getAccessibleMock(Backend::class, null, [$configurationManager], '', false); $backend->_set('session', $session); self::assertEquals($backend->getIdentifierByObject($proxy), $fakeUuid); diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php index a36fb2b0a45f..aafc403c4ea4 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapFactoryTest.php @@ -184,7 +184,7 @@ class DataMapFactoryTest extends UnitTestCase $mockColumnMap->expects(self::once()) ->method('setRelationTableMatchFields') ->with($matchFields); - $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $mockDataMapFactory->_call('setOneToOneRelation', $mockColumnMap, $columnConfiguration); } @@ -207,7 +207,7 @@ class DataMapFactoryTest extends UnitTestCase $mockColumnMap->expects(self::once()) ->method('setRelationTableMatchFields') ->with($matchFields); - $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $mockDataMapFactory->_call('setOneToManyRelation', $mockColumnMap, $columnConfiguration); } @@ -234,7 +234,7 @@ class DataMapFactoryTest extends UnitTestCase $mockColumnMap->expects(self::never())->method('setParentTableFieldName'); $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields'); $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields'); - $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']); } @@ -261,7 +261,7 @@ class DataMapFactoryTest extends UnitTestCase $mockColumnMap->expects(self::never())->method('setParentTableFieldName'); $mockColumnMap->expects(self::never())->method('setRelationTableMatchFields'); $mockColumnMap->expects(self::never())->method('setRelationTableInsertFields'); - $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $mockDataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $mockDataMapFactory->_call('setManyToManyRelation', $mockColumnMap, $rightColumnsDefinition['lefts']); } @@ -416,7 +416,7 @@ class DataMapFactoryTest extends UnitTestCase */ public function resolveTableNameReturnsExpectedTablenames($className, $expected): void { - $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); self::assertSame($expected, $dataMapFactory->_call('resolveTableName', $className)); } @@ -425,7 +425,7 @@ class DataMapFactoryTest extends UnitTestCase */ public function createColumnMapReturnsAValidColumnMap(): void { - $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $columnMap = $this->getMockBuilder(ColumnMap::class) ->setConstructorArgs(['column', 'property']) @@ -472,9 +472,9 @@ class DataMapFactoryTest extends UnitTestCase */ public function setTypeDetectsTypeProperly(array $columnConfiguration, string $type): void { - $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); - $columnMap = $this->getAccessibleMock(ColumnMap::class, ['dummy'], [], '', false); + $columnMap = $this->getAccessibleMock(ColumnMap::class, null, [], '', false); $dataMapFactory->_call('setType', $columnMap, $columnConfiguration); diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php index f926a3c78895..ea37a5981a99 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php @@ -141,7 +141,7 @@ class DataMapperTest extends UnitTestCase 'uninitializedMandatoryDateTimeProperty' => new ColumnMap('uninitializedMandatoryDateTimeProperty', 'uninitializedMandatoryDateTimeProperty'), 'initializedDateTimeProperty' => new ColumnMap('initializedDateTimeProperty', 'initializedDateTimeProperty'), ]; - $dataMap = $this->getAccessibleMock(DataMap::class, ['dummy'], [$className, $className]); + $dataMap = $this->getAccessibleMock(DataMap::class, null, [$className, $className]); $dataMap->_set('columnMaps', $columnMaps); $dataMaps = [ $className => $dataMap, @@ -152,7 +152,7 @@ class DataMapperTest extends UnitTestCase ->onlyMethods(['getClassSchema']) ->getMock(); $mockReflectionService->method('getClassSchema')->willReturn($classSchema); - $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $dataMapFactory->_set('dataMaps', $dataMaps); $dataMapper = $this->getAccessibleMock( DataMapper::class, @@ -196,7 +196,7 @@ class DataMapperTest extends UnitTestCase $columnMaps = [ 'unknownType' => new ColumnMap('unknownType', 'unknownType'), ]; - $dataMap = $this->getAccessibleMock(DataMap::class, ['dummy'], [$className, $className]); + $dataMap = $this->getAccessibleMock(DataMap::class, null, [$className, $className]); $dataMap->_set('columnMaps', $columnMaps); $dataMaps = [ $className => $dataMap, @@ -207,7 +207,7 @@ class DataMapperTest extends UnitTestCase ->onlyMethods(['getClassSchema']) ->getMock(); $mockReflectionService->method('getClassSchema')->willReturn($classSchema); - $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, ['dummy'], [], '', false); + $dataMapFactory = $this->getAccessibleMock(DataMapFactory::class, null, [], '', false); $dataMapFactory->_set('dataMaps', $dataMaps); $dataMapper = $this->getAccessibleMock( DataMapper::class, @@ -383,7 +383,7 @@ class DataMapperTest extends UnitTestCase */ public function mapDateTimeHandlesDifferentFieldEvaluations($value, $storageFormat, $expectedValue): void { - $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, ['dummy'], [], '', false); + $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, null, [], '', false); $dateTime = $accessibleDataMapFactory->_call('mapDateTime', $value, $storageFormat); @@ -416,7 +416,7 @@ class DataMapperTest extends UnitTestCase $originalTimeZone = date_default_timezone_get(); date_default_timezone_set('America/Chicago'); $usedTimeZone = date_default_timezone_get(); - $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, ['dummy'], [], '', false); + $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, null, [], '', false); /** @var \DateTime|MockObject|AccessibleObjectInterface $dateTime */ $dateTime = $accessibleDataMapFactory->_call('mapDateTime', $value, $storageFormat); @@ -435,7 +435,7 @@ class DataMapperTest extends UnitTestCase */ public function mapDateTimeHandlesSubclassesOfDateTime(): void { - $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, ['dummy'], [], '', false); + $accessibleDataMapFactory = $this->getAccessibleMock(DataMapper::class, null, [], '', false); $targetType = 'TYPO3\CMS\Extbase\Tests\Unit\Persistence\Fixture\Model\CustomDateTime'; $date = '2013-01-01 01:02:03'; $storageFormat = 'datetime'; diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php index 686744c329dd..087fd76c7c0c 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/PersistenceManagerTest.php @@ -332,7 +332,7 @@ class PersistenceManagerTest extends UnitTestCase $changedEntities = new ObjectStorage(); $entity1 = new $classNameWithNamespace(); - $repository = $this->getAccessibleMock($repositoryClassNameWithNamespace, ['dummy']); + $repository = $this->getAccessibleMock($repositoryClassNameWithNamespace, null); $repository->_set('objectType', get_class($entity1)); $mockBackend = $this->getMockBuilder(Backend::class) diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php index efff587ab694..e725293dcb04 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/QueryResultTest.php @@ -58,7 +58,7 @@ class QueryResultTest extends UnitTestCase $this->mockPersistenceManager->method('getObjectCountByQuery')->willReturn(2); $this->mockDataMapper = $this->createMock(DataMapper::class); $this->mockQuery = $this->createMock(QueryInterface::class); - $this->queryResult = $this->getAccessibleMock(QueryResult::class, ['dummy'], [], '', false); + $this->queryResult = $this->getAccessibleMock(QueryResult::class, null, [], '', false); $this->queryResult->_set('persistenceManager', $this->mockPersistenceManager); $this->queryResult->_set('dataMapper', $this->mockDataMapper); $this->sampleResult = [['foo' => 'Foo1', 'bar' => 'Bar1'], ['foo' => 'Foo2', 'bar' => 'Bar2']]; @@ -219,7 +219,7 @@ class QueryResultTest extends UnitTestCase */ public function initializeExecutesQueryWithArrayFetchMode(): void { - $queryResult = $this->getAccessibleMock(QueryResult::class, ['dummy'], [], '', false); + $queryResult = $this->getAccessibleMock(QueryResult::class, null, [], '', false); $queryResult->_set('persistenceManager', $this->mockPersistenceManager); $queryResult->_set('dataMapper', $this->mockDataMapper); $queryResult->setQuery($this->mockQuery); diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php index 0acbfcb46850..211ec320bd45 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php @@ -322,7 +322,7 @@ class Typo3DbQueryParserTest extends UnitTestCase new Context(), $this->prophesize(ConfigurationManagerInterface::class)->reveal() ); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -344,7 +344,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $this->prophesize(ConfigurationManagerInterface::class)->reveal() ); $querySettings->setLanguageAspect(new LanguageAspect(1)); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -365,7 +365,7 @@ class Typo3DbQueryParserTest extends UnitTestCase new Context(), $this->prophesize(ConfigurationManagerInterface::class)->reveal() ); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -388,7 +388,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $this->prophesize(ConfigurationManagerInterface::class)->reveal() ); $querySettings->setLanguageAspect(new LanguageAspect(0)); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -410,7 +410,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $this->prophesize(ConfigurationManagerInterface::class)->reveal() ); $querySettings->setLanguageAspect(new LanguageAspect(2)); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -435,7 +435,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $querySettings->setIgnoreEnableFields(true); $querySettings->setIncludeDeleted(true); $querySettings->setLanguageAspect(new LanguageAspect(2, 2, LanguageAspect::OVERLAYS_MIXED)); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderProphetWithQueryBuilderForSubselect(); @@ -464,7 +464,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $querySettings->setLanguageAspect(new LanguageAspect(2, 2, LanguageAspect::OVERLAYS_MIXED)); $querySettings->setIgnoreEnableFields(true); $querySettings->setIncludeDeleted(true); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderProphetWithQueryBuilderForSubselect(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $compositeExpression= $mockTypo3DbQueryParser->_call('getLanguageStatement', $table, $table, $querySettings); @@ -490,7 +490,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $querySettings->setLanguageAspect(new LanguageAspect(2, 2, LanguageAspect::OVERLAYS_MIXED)); $querySettings->setIgnoreEnableFields(true); $querySettings->setIncludeDeleted(true); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderProphetWithQueryBuilderForSubselect(); @@ -520,7 +520,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $queryBuilderProphet->addOrderBy('tx_myext_tablename.converted_fieldname', 'ASC')->shouldBeCalledTimes(1); $orderings = ['fooProperty' => QueryInterface::ORDER_ASCENDING]; - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $mockTypo3DbQueryParser->_set('dataMapper', $mockDataMapper); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $mockTypo3DbQueryParser->_call('parseOrderings', $orderings, $mockSource); @@ -545,7 +545,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $mockDataMapper->expects(self::never())->method('convertClassNameToTableName'); $mockDataMapper->expects(self::never())->method('convertPropertyNameToColumnName'); $orderings = ['fooProperty' => 'unsupported_order']; - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $mockTypo3DbQueryParser->_set('dataMapper', $mockDataMapper); $mockTypo3DbQueryParser->_call('parseOrderings', $orderings, $mockSource); @@ -571,7 +571,7 @@ class Typo3DbQueryParserTest extends UnitTestCase 'fooProperty' => QueryInterface::ORDER_ASCENDING, 'barProperty' => QueryInterface::ORDER_DESCENDING, ]; - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $mockTypo3DbQueryParser->_set('dataMapper', $mockDataMapper); $queryBuilder = $this->getMockBuilder(QueryBuilder::class) @@ -654,7 +654,7 @@ class Typo3DbQueryParserTest extends UnitTestCase ->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); } - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $resultSql = $mockTypo3DbQueryParser->_call('getVisibilityConstraintStatement', $mockQuerySettings, $tableName, $tableName); self::assertSame($expectedSql, $resultSql); unset($GLOBALS['TCA'][$tableName]); @@ -720,7 +720,7 @@ class Typo3DbQueryParserTest extends UnitTestCase ->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); } - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $actualSql = $mockTypo3DbQueryParser->_call('getVisibilityConstraintStatement', $mockQuerySettings, $tableName, $tableName); self::assertSame($expectedSql, $actualSql); unset($GLOBALS['TCA'][$tableName]); @@ -786,7 +786,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $mockQuerySettings->setIgnoreEnableFields(!$respectEnableFields); $mockQuerySettings->setIncludeDeleted(!$respectEnableFields); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $actualSql = $mockTypo3DbQueryParser->_call('getVisibilityConstraintStatement', $mockQuerySettings, $tableName, $tableName); self::assertSame($expectedSql, $actualSql); unset($GLOBALS['TCA'][$tableName]); @@ -817,7 +817,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $GLOBALS['TYPO3_REQUEST'] = (new ServerRequest()) ->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE); - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $mockTypo3DbQueryParser->_call('getVisibilityConstraintStatement', $mockQuerySettings, $tableName, $tableName); unset($GLOBALS['TCA'][$tableName]); @@ -868,7 +868,7 @@ class Typo3DbQueryParserTest extends UnitTestCase $GLOBALS['TCA'][$table]['ctrl'] = [ 'rootLevel' => $rootLevel, ]; - $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, ['dummy'], [], '', false); + $mockTypo3DbQueryParser = $this->getAccessibleMock(Typo3DbQueryParser::class, null, [], '', false); $queryBuilderProphet = $this->getQueryBuilderWithExpressionBuilderProphet(); $mockTypo3DbQueryParser->_set('queryBuilder', $queryBuilderProphet->reveal()); $sql = $mockTypo3DbQueryParser->_call('getPageIdStatement', $table, $table, $storagePageIds); diff --git a/typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php b/typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php index d8c7422e4809..17a74bb84af9 100644 --- a/typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php +++ b/typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php @@ -90,7 +90,7 @@ class RepositoryTest extends UnitTestCase $this->mockQueryFactory->method('create')->willReturn($this->mockQuery); $this->mockSession = $this->createMock(Session::class); $this->mockConfigurationManager = $this->createMock(ConfigurationManager::class); - $this->mockBackend = $this->getAccessibleMock(Backend::class, ['dummy'], [$this->mockConfigurationManager], '', false); + $this->mockBackend = $this->getAccessibleMock(Backend::class, null, [$this->mockConfigurationManager], '', false); $this->mockBackend->_set('session', $this->mockSession); $this->mockPersistenceManager = $this->getAccessibleMock( PersistenceManager::class, @@ -103,7 +103,7 @@ class RepositoryTest extends UnitTestCase ); $this->mockBackend->setPersistenceManager($this->mockPersistenceManager); $this->mockPersistenceManager->method('createQueryForType')->willReturn($this->mockQuery); - $this->repository = $this->getAccessibleMock(Repository::class, ['dummy']); + $this->repository = $this->getAccessibleMock(Repository::class, null); $this->repository->injectPersistenceManager($this->mockPersistenceManager); } @@ -329,7 +329,7 @@ class RepositoryTest extends UnitTestCase { $this->expectException(IllegalObjectTypeException::class); $this->expectExceptionCode(1249479625); - $repository = $this->getAccessibleMock(Repository::class, ['dummy']); + $repository = $this->getAccessibleMock(Repository::class, null); $repository->_set('objectType', 'ExpectedObjectType'); $repository->update(new \stdClass()); diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php index 587e1abc47e4..9a9d3b24d37a 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Controller/UploadExtensionFileControllerTest.php @@ -68,7 +68,7 @@ class UploadExtensionFileControllerTest extends UnitTestCase */ public function getExtensionKeyFromFileNameExtractsExtensionKey(string $filename, string $expectedKey): void { - $subject = $this->getAccessibleMock(UploadExtensionFileController::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(UploadExtensionFileController::class, null, [], '', false); self::assertEquals($expectedKey, $subject->_call('getExtensionKeyFromFileName', $filename)); } } diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ExtensionRepositoryTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ExtensionRepositoryTest.php index 4518cdd1f1e5..1c48dff50dc6 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ExtensionRepositoryTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ExtensionRepositoryTest.php @@ -49,7 +49,7 @@ class ExtensionRepositoryTest extends UnitTestCase $bar3->setVersion('1.0.3'); $input = [$foo1, $foo2, $bar1, $bar2, $bar3]; - $subject = $this->getAccessibleMock(ExtensionRepository::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(ExtensionRepository::class, null, [], '', false); self::assertEquals(['foo' => $foo2, 'bar' => $bar1], $subject->_call('filterYoungestVersionOfExtensionList', $input, true)); } @@ -90,7 +90,7 @@ class ExtensionRepositoryTest extends UnitTestCase $bar2->setDependencies($suitableDependencies); $input = [$foo1, $foo2, $bar1, $bar2]; - $subject = $this->getAccessibleMock(ExtensionRepository::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(ExtensionRepository::class, null, [], '', false); self::assertEquals(['foo' => $foo1, 'bar' => $bar2], $subject->_call('filterYoungestVersionOfExtensionList', $input, false)); } @@ -116,7 +116,7 @@ class ExtensionRepositoryTest extends UnitTestCase $unsuitableExtension->setDependencies($unsuitableDependencies); $input = [$suitableExtension, $unsuitableExtension]; - $subject = $this->getAccessibleMock(ExtensionRepository::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(ExtensionRepository::class, null, [], '', false); self::assertSame($this->count($subject->_call('getExtensionsSuitableForTypo3Version', $input)), 1); } diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Parser/ExtensionXmlParserTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Parser/ExtensionXmlParserTest.php index d0df2cfd9c8e..a4f9baeb23c4 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Parser/ExtensionXmlParserTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Parser/ExtensionXmlParserTest.php @@ -28,7 +28,7 @@ class ExtensionXmlParserTest extends UnitTestCase */ public function isValidVersionNumber(string $versionNumber, bool $isValid): void { - $subject = $this->getAccessibleMock(ExtensionXmlParser::class, ['dummy']); + $subject = $this->getAccessibleMock(ExtensionXmlParser::class, null); $subject->_set('version', $versionNumber); self::assertEquals($isValid, $subject->isValidVersionNumber()); diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php index e39ccd85ebbb..9fb34ac29bc6 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php @@ -241,7 +241,7 @@ class DependencyUtilityTest extends UnitTestCase ->getMock(); $listUtilityMock->injectEventDispatcher($eventDispatcher); $listUtilityMock->expects(self::atLeastOnce())->method('getAvailableExtensions')->willReturn($availableExtensions); - $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, ['dummy']); + $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, null); $dependencyUtility->injectListUtility($listUtilityMock); self::assertTrue($dependencyUtility->_call('isDependentExtensionAvailable', 'dummy')); @@ -263,7 +263,7 @@ class DependencyUtilityTest extends UnitTestCase ->getMock(); $listUtilityMock->injectEventDispatcher($eventDispatcher); $listUtilityMock->expects(self::atLeastOnce())->method('getAvailableExtensions')->willReturn($availableExtensions); - $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, ['dummy']); + $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, null); $dependencyUtility->injectListUtility($listUtilityMock); self::assertFalse($dependencyUtility->_call('isDependentExtensionAvailable', '42')); @@ -302,7 +302,7 @@ class DependencyUtilityTest extends UnitTestCase ->addMethods(['countByExtensionKey']) ->getMock(); $extensionRepositoryMock->expects(self::once())->method('countByExtensionKey')->with('test123')->willReturn(1); - $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, ['dummy']); + $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, null); $dependencyUtility->injectExtensionRepository($extensionRepositoryMock); $count = $dependencyUtility->_call('isExtensionDownloadableFromRemote', 'test123'); @@ -318,7 +318,7 @@ class DependencyUtilityTest extends UnitTestCase ->addMethods(['countByExtensionKey']) ->getMock(); $extensionRepositoryMock->expects(self::once())->method('countByExtensionKey')->with('test123')->willReturn(0); - $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, ['dummy']); + $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, null); $dependencyUtility->injectExtensionRepository($extensionRepositoryMock); $count = $dependencyUtility->_call('isExtensionDownloadableFromRemote', 'test123'); @@ -335,7 +335,7 @@ class DependencyUtilityTest extends UnitTestCase ->onlyMethods(['countByVersionRangeAndExtensionKey']) ->getMock(); $extensionRepositoryMock->expects(self::once())->method('countByVersionRangeAndExtensionKey')->with('dummy', 1000000, 10000000)->willReturn(2); - $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, ['dummy']); + $dependencyUtility = $this->getAccessibleMock(DependencyUtility::class, null); $dependencyUtility->injectExtensionRepository($extensionRepositoryMock); $count = $dependencyUtility->_call('isDownloadableVersionCompatible', $dependency); diff --git a/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php b/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php index 4e77b7e45d1a..c76c91e17c56 100644 --- a/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php +++ b/typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php @@ -120,7 +120,7 @@ class FileHandlingUtilityTest extends UnitTestCase public function addDirectoryAddsDirectory(): void { $extDirPath = $this->testRoot . StringUtility::getUniqueId('test-extensions-'); - $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy']); + $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, null); $fileHandlerMock->_call('addDirectory', $extDirPath); self::assertDirectoryExists($extDirPath); } @@ -132,7 +132,7 @@ class FileHandlingUtilityTest extends UnitTestCase { $extDirPath = $this->testRoot . StringUtility::getUniqueId('test-extensions-'); @mkdir($extDirPath); - $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, ['dummy']); + $fileHandlerMock = $this->getAccessibleMock(FileHandlingUtility::class, null); $fileHandlerMock->_call('removeDirectory', $extDirPath); self::assertDirectoryDoesNotExist($extDirPath); } diff --git a/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php b/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php index ccdbd3b6ac22..38ac4a46b695 100644 --- a/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php +++ b/typo3/sysext/felogin/Tests/Unit/Validation/RedirectUrlValidatorTest.php @@ -60,7 +60,7 @@ class RedirectUrlValidatorTest extends UnitTestCase $this->testHostName = 'hostname.tld'; $this->testSitePath = '/'; - $this->accessibleFixture = $this->getAccessibleMock(RedirectUrlValidator::class, ['dummy'], [$mockedSiteFinder]); + $this->accessibleFixture = $this->getAccessibleMock(RedirectUrlValidator::class, null, [$mockedSiteFinder]); $this->accessibleFixture->setLogger(new NullLogger()); $this->setUpFakeSitePathAndHost(); } diff --git a/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php b/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php index e046ff7c34fa..4a8371774114 100644 --- a/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php +++ b/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php @@ -54,7 +54,7 @@ class AbstractTemplateViewTest extends UnitTestCase ->disableOriginalConstructor() ->getMock(); $this->renderingContext->method('getViewHelperVariableContainer')->willReturn($this->viewHelperVariableContainer); - $this->view = $this->getAccessibleMock(AbstractTemplateView::class, ['dummy'], [], '', false); + $this->view = $this->getAccessibleMock(AbstractTemplateView::class, null, [], '', false); $this->view->setRenderingContext($this->renderingContext); } diff --git a/typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php b/typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php index 1c4517d17cae..efa265d0b400 100644 --- a/typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php +++ b/typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php @@ -44,7 +44,7 @@ class FormEditorControllerTest extends UnitTestCase ->method('translate') ->willReturnArgument(4); - $subject = $this->getAccessibleMock(FormEditorController::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FormEditorController::class, null, [], '', false); $subject->_set('prototypeConfiguration', [ 'formEditor' => [ 'formElementGroups' => [ @@ -129,7 +129,7 @@ class FormEditorControllerTest extends UnitTestCase ->method('translateValuesRecursive') ->willReturnArgument(0); - $subject = $this->getAccessibleMock(FormEditorController::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(FormEditorController::class, null, [], '', false); $subject->_set('prototypeConfiguration', [ 'formEditor' => [ 'someOtherValues' => [ diff --git a/typo3/sysext/form/Tests/Unit/Domain/Configuration/ConfigurationServiceTest.php b/typo3/sysext/form/Tests/Unit/Domain/Configuration/ConfigurationServiceTest.php index 62685c51c098..e6a9ea383453 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Configuration/ConfigurationServiceTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Configuration/ConfigurationServiceTest.php @@ -427,7 +427,7 @@ class ConfigurationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528633966); - $configurationService = $this->getAccessibleMock(ConfigurationService::class, ['dummy'], [], '', false); + $configurationService = $this->getAccessibleMock(ConfigurationService::class, null, [], '', false); $input = ['dummy']; $configurationService->_call('addAdditionalPropertyPathsFromHook', '', '', $input, []); @@ -441,7 +441,7 @@ class ConfigurationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528634966); - $configurationService = $this->getAccessibleMock(ConfigurationService::class, ['dummy'], [], '', false); + $configurationService = $this->getAccessibleMock(ConfigurationService::class, null, [], '', false); $validationDto = new ValidationDto('Bar', 'Foo'); $input = [$validationDto]; diff --git a/typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php b/typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php index 3a257ebe2e5d..b37cb3d07cdc 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php @@ -46,7 +46,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528588036); - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; @@ -74,7 +74,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528588037); - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; @@ -95,7 +95,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase */ public function validateAllFormElementPropertyValuesByHmacThrowsNoExceptionIfHmacIsValid(): void { - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; @@ -134,7 +134,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528591586); - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; @@ -174,7 +174,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase $this->expectException(PropertyException::class); $this->expectExceptionCode(1528591585); - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; @@ -207,7 +207,7 @@ class FormDefinitionValidationServiceTest extends UnitTestCase */ public function validateAllPropertyCollectionElementValuesByHmacThrowsNoExceptionIfHmacIsValid(): void { - $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionValidationService::class, null, [], '', false); $prototypeName = 'standard'; $identifier = 'some-text'; diff --git a/typo3/sysext/form/Tests/Unit/Domain/Factory/ArrayFormFactoryTest.php b/typo3/sysext/form/Tests/Unit/Domain/Factory/ArrayFormFactoryTest.php index a197e0edb717..25c00e18c477 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Factory/ArrayFormFactoryTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Factory/ArrayFormFactoryTest.php @@ -34,7 +34,7 @@ class ArrayFormFactoryTest extends UnitTestCase $this->expectExceptionCode(1329289436); $section = new Section('test', 'page'); - $arrayFormFactory = $this->getAccessibleMock(ArrayFormFactory::class, ['dummy']); + $arrayFormFactory = $this->getAccessibleMock(ArrayFormFactory::class, null); $arrayFormFactory->_call('addNestedRenderable', [], $section); } @@ -51,7 +51,7 @@ class ArrayFormFactoryTest extends UnitTestCase 'identifier' => 'test-3', 'type' => 'Foo', ]; - $arrayFormFactory = $this->getAccessibleMock(ArrayFormFactory::class, ['dummy']); + $arrayFormFactory = $this->getAccessibleMock(ArrayFormFactory::class, null); $result = $arrayFormFactory->_call('addNestedRenderable', $configuration, $section); self::assertSame($unknownElement, $result); } diff --git a/typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php b/typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php index b55f54087112..f093c96b352c 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php @@ -33,7 +33,7 @@ class ClosureFinisherTest extends UnitTestCase return 'foobar'; }; - $mockClosureFinisher = $this->getAccessibleMock(ClosureFinisher::class, ['dummy'], [], '', false); + $mockClosureFinisher = $this->getAccessibleMock(ClosureFinisher::class, null, [], '', false); $mockClosureFinisher->_set('options', [ 'closure' => $closure, ]); diff --git a/typo3/sysext/form/Tests/Unit/Domain/Renderable/RenderableVariantTest.php b/typo3/sysext/form/Tests/Unit/Domain/Renderable/RenderableVariantTest.php index 21e86af06dc0..9ad7bb4bdbaa 100644 --- a/typo3/sysext/form/Tests/Unit/Domain/Renderable/RenderableVariantTest.php +++ b/typo3/sysext/form/Tests/Unit/Domain/Renderable/RenderableVariantTest.php @@ -53,7 +53,7 @@ class RenderableVariantTest extends UnitTestCase ], ]; - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'SingleSelect'); $mockFormElement->_set('identifier', $formElementIdentifier); diff --git a/typo3/sysext/form/Tests/Unit/Mvc/Configuration/YamlSourceTest.php b/typo3/sysext/form/Tests/Unit/Mvc/Configuration/YamlSourceTest.php index c27bd154d595..c7efa78bebbe 100644 --- a/typo3/sysext/form/Tests/Unit/Mvc/Configuration/YamlSourceTest.php +++ b/typo3/sysext/form/Tests/Unit/Mvc/Configuration/YamlSourceTest.php @@ -87,7 +87,7 @@ class YamlSourceTest extends UnitTestCase */ public function loadOverruleNonArrayValuesOverArrayValues(): void { - $mockYamlSource = $this->getAccessibleMock(YamlSource::class, ['dummy'], [], '', false); + $mockYamlSource = $this->getAccessibleMock(YamlSource::class, null, [], '', false); $input = [ 'EXT:form/Tests/Unit/Mvc/Configuration/Fixtures/OverruleNonArrayValuesOverArrayValues1.yaml', @@ -109,7 +109,7 @@ class YamlSourceTest extends UnitTestCase */ public function loadRemovesVendorNamespacePrefixFromConfiguration(): void { - $mockYamlSource = $this->getAccessibleMock(YamlSource::class, ['dummy'], [], '', false); + $mockYamlSource = $this->getAccessibleMock(YamlSource::class, null, [], '', false); $input = [ 'EXT:form/Tests/Unit/Mvc/Configuration/Fixtures/ConfigurationWithVendorNamespacePrefix1.yaml', diff --git a/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php b/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php index 354bcad2b5ba..0a3497ab66b8 100644 --- a/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php +++ b/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php @@ -40,7 +40,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1477679819); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $runtimeCache= $this->getMockBuilder(VariableFrontend::class) ->onlyMethods(['get', 'set']) @@ -65,7 +65,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1484071985); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $runtimeCache= $this->getMockBuilder(VariableFrontend::class) ->onlyMethods(['get', 'set']) @@ -96,7 +96,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1477679820); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $input = '-1:/user_uploads/_example.php'; $mockFormPersistenceManager->_call('save', $input, []); @@ -110,7 +110,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1477680881); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $mockFormPersistenceManager->_set('formSettings', [ 'persistenceManager' => [ @@ -130,7 +130,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1484073571); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $runtimeCache= $this->getMockBuilder(VariableFrontend::class) ->onlyMethods(['get', 'set']) @@ -162,7 +162,7 @@ class FormPersistenceManagerTest extends UnitTestCase $this->expectException(PersistenceManagerException::class); $this->expectExceptionCode(1472239534); - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $input = '-1:/user_uploads/_example.php'; $mockFormPersistenceManager->_call('delete', $input); @@ -286,7 +286,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function existsReturnsTrueIfPersistenceIdentifierIsExtensionLocationAndFileExistsAndFileHasYamlExtension(): void { - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $runtimeCache= $this->getMockBuilder(VariableFrontend::class) ->onlyMethods(['get', 'set']) @@ -316,7 +316,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function existsReturnsFalseIfPersistenceIdentifierIsExtensionLocationAndFileExistsAndFileHasNoYamlExtension(): void { - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $input = 'EXT:form/Tests/Unit/Mvc/Persistence/Fixtures/BlankForm.txt'; self::assertFalse($mockFormPersistenceManager->_call('exists', $input)); } @@ -326,7 +326,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function existsReturnsFalseIfPersistenceIdentifierIsExtensionLocationAndFileExistsAndExtensionLocationIsNotAllowed(): void { - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $mockFormPersistenceManager->_set('formSettings', [ 'persistenceManager' => [ @@ -343,7 +343,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function existsReturnsFalseIfPersistenceIdentifierIsExtensionLocationAndFileNotExistsAndFileHasYamlExtension(): void { - $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockFormPersistenceManager = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $input = 'EXT:form/Tests/Unit/Mvc/Persistence/Fixtures/_BlankForm.yaml'; self::assertFalse($mockFormPersistenceManager->_call('exists', $input)); } @@ -602,7 +602,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function metaDataIsExtracted(string $maybeRawFormDefinition, array $expectedMetaData): void { - $formPersistenceManagerMock = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $formPersistenceManagerMock = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); self::assertSame($expectedMetaData, $formPersistenceManagerMock->_call('extractMetaDataFromCouldBeFormDefinition', $maybeRawFormDefinition)); } @@ -611,7 +611,7 @@ class FormPersistenceManagerTest extends UnitTestCase */ public function overrideByTypoScriptSettingsReturnsNotOverriddenConfigurationIfNoTypoScriptOverridesExists(): void { - $mockController = $this->getAccessibleMock(FormPersistenceManager::class, ['dummy'], [], '', false); + $mockController = $this->getAccessibleMock(FormPersistenceManager::class, null, [], '', false); $mockController->_set('typoScriptSettings', [ 'formDefinitionOverrides' => [ ], diff --git a/typo3/sysext/form/Tests/Unit/Mvc/Property/TypeConverter/FormDefinitionArrayConverterTest.php b/typo3/sysext/form/Tests/Unit/Mvc/Property/TypeConverter/FormDefinitionArrayConverterTest.php index a6cc37fa0dcb..c9fe80e4b84d 100644 --- a/typo3/sysext/form/Tests/Unit/Mvc/Property/TypeConverter/FormDefinitionArrayConverterTest.php +++ b/typo3/sysext/form/Tests/Unit/Mvc/Property/TypeConverter/FormDefinitionArrayConverterTest.php @@ -114,7 +114,7 @@ class FormDefinitionArrayConverterTest extends UnitTestCase */ public function transformMultiValueElementsForFormFrameworkTransformValues(): void { - $typeConverter = $this->getAccessibleMock(FormDefinitionArrayConverter::class, ['dummy'], [], '', false); + $typeConverter = $this->getAccessibleMock(FormDefinitionArrayConverter::class, null, [], '', false); $input = [ 'foo1' => 'bar', diff --git a/typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php b/typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php index 3c43764dbbe4..feda465f23b2 100644 --- a/typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php +++ b/typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php @@ -375,7 +375,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -419,7 +419,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -463,7 +463,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -507,7 +507,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -551,7 +551,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -598,7 +598,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -645,7 +645,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -690,7 +690,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(Page::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(Page::class, null, [], '', false); $mockFormElement->_set('type', 'Page'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -742,7 +742,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -795,7 +795,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -904,7 +904,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($formRuntimeXlfPaths); $this->store->flushData($textElementXlfPaths); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -1075,7 +1075,7 @@ class TranslationServiceTest extends UnitTestCase $this->store->flushData($textElementXlfPath); } - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('renderingOptions', $formElementRenderingOptions); @@ -1115,7 +1115,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getRenderingOptions')->willReturn($formRuntimeRenderingOptions); $mockFormRuntime->method('getType')->willReturn('Form'); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); @@ -1155,7 +1155,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getRenderingOptions')->willReturn($formRuntimeRenderingOptions); $mockFormRuntime->method('getType')->willReturn('Form'); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); @@ -1194,7 +1194,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getType')->willReturn('Form'); $mockFormRuntime->method('getProperties')->willReturn([]); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); @@ -1235,7 +1235,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getType')->willReturn('Form'); $mockFormRuntime->method('getProperties')->willReturn([]); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); @@ -1337,7 +1337,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getType')->willReturn('Form'); $mockFormRuntime->method('getProperties')->willReturn([]); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); @@ -1380,7 +1380,7 @@ class TranslationServiceTest extends UnitTestCase $mockFormRuntime->method('getRenderingOptions')->willReturn($formRuntimeRenderingOptions); $mockFormRuntime->method('getType')->willReturn('Form'); - $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, ['dummy'], [], '', false); + $mockFormElement = $this->getAccessibleMock(GenericFormElement::class, null, [], '', false); $mockFormElement->_set('type', 'Text'); $mockFormElement->_set('identifier', $formElementIdentifier); diff --git a/typo3/sysext/frontend/Tests/Unit/ContentObject/ImageContentObjectTest.php b/typo3/sysext/frontend/Tests/Unit/ContentObject/ImageContentObjectTest.php index 8890ba6cdfec..66415e9c214d 100644 --- a/typo3/sysext/frontend/Tests/Unit/ContentObject/ImageContentObjectTest.php +++ b/typo3/sysext/frontend/Tests/Unit/ContentObject/ImageContentObjectTest.php @@ -45,7 +45,7 @@ class ImageContentObjectTest extends UnitTestCase $tsfe = $this->getMockBuilder(TypoScriptFrontendController::class)->disableOriginalConstructor()->getMock(); $GLOBALS['TSFE'] = $tsfe; $contentObjectRenderer = new ContentObjectRenderer($tsfe); - $this->subject = $this->getAccessibleMock(ImageContentObject::class, ['dummy'], [ + $this->subject = $this->getAccessibleMock(ImageContentObject::class, null, [ new MarkerBasedTemplateService( new NullFrontend('hash'), new NullFrontend('runtime'), @@ -373,7 +373,7 @@ class ImageContentObjectTest extends UnitTestCase ->with(self::equalTo('testImageName')) ->willReturn([100, 100, null, 'bar-file.jpg']); - $subject = $this->getAccessibleMock(ImageContentObject::class, ['dummy'], [ + $subject = $this->getAccessibleMock(ImageContentObject::class, null, [ new MarkerBasedTemplateService( new NullFrontend('hash'), new NullFrontend('runtime'), diff --git a/typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php b/typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php index ead448992eae..422a852f6eca 100644 --- a/typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php @@ -480,7 +480,7 @@ class RequestHandlerTest extends UnitTestCase $_POST = $postVars; $request = ServerRequestFactory::fromGlobals(); - $subject = $this->getAccessibleMock(RequestHandler::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(RequestHandler::class, null, [], '', false); $subject->_call('resetGlobalsToCurrentRequest', $request); self::assertEquals($_GET, $getVars); self::assertEquals($_POST, $postVars); @@ -506,7 +506,7 @@ class RequestHandlerTest extends UnitTestCase $request = $request->withQueryParams($modifiedGetVars); $request = $request->withParsedBody($modifiedPostVars); - $subject = $this->getAccessibleMock(RequestHandler::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(RequestHandler::class, null, [], '', false); $subject->_call('resetGlobalsToCurrentRequest', $request); self::assertEquals($_GET, $modifiedGetVars); self::assertEquals($_POST, $modifiedPostVars); diff --git a/typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php b/typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php index 66a1aa216412..66dc978b8457 100644 --- a/typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php @@ -49,7 +49,7 @@ class SiteResolverTest extends UnitTestCase { parent::setUp(); $this->originalLocale = setlocale(LC_COLLATE, '0'); - $this->siteFinder = $this->getAccessibleMock(SiteFinder::class, ['dummy'], [], '', false); + $this->siteFinder = $this->getAccessibleMock(SiteFinder::class, null, [], '', false); // A request handler which expects a site to be found. $this->siteFoundRequestHandler = new class () implements RequestHandlerInterface { diff --git a/typo3/sysext/frontend/Tests/Unit/Typolink/LinkVarsCalculatorTest.php b/typo3/sysext/frontend/Tests/Unit/Typolink/LinkVarsCalculatorTest.php index 2d5dbb5e4fd4..537e113354cc 100644 --- a/typo3/sysext/frontend/Tests/Unit/Typolink/LinkVarsCalculatorTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Typolink/LinkVarsCalculatorTest.php @@ -183,7 +183,7 @@ class LinkVarsCalculatorTest extends UnitTestCase */ public function splitLinkVarsStringSplitsStringByComma(string $string, array $expected): void { - $subject = $this->getAccessibleMock(LinkVarsCalculator::class, ['dummy']); + $subject = $this->getAccessibleMock(LinkVarsCalculator::class, null); self::assertEquals($expected, $subject->_call('splitLinkVarsString', $string)); } } diff --git a/typo3/sysext/frontend/Tests/Unit/Typolink/PageLinkBuilderTest.php b/typo3/sysext/frontend/Tests/Unit/Typolink/PageLinkBuilderTest.php index 07141ba2dfaf..ae0e7382b539 100644 --- a/typo3/sysext/frontend/Tests/Unit/Typolink/PageLinkBuilderTest.php +++ b/typo3/sysext/frontend/Tests/Unit/Typolink/PageLinkBuilderTest.php @@ -54,7 +54,7 @@ class PageLinkBuilderTest extends UnitTestCase $GLOBALS['TSFE'] = new \stdClass(); $cObj = new ContentObjectRenderer(); $cObj->setRequest($request); - $subject = $this->getAccessibleMock(PageLinkBuilder::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(PageLinkBuilder::class, null, [], '', false); $subject->_set('contentObjectRenderer', $cObj); $actualResult = $subject->_call('getQueryArguments', 'untrusted', $configuration); self::assertEquals($expectedResult, $actualResult); diff --git a/typo3/sysext/impexp/Tests/Functional/Export/ExportPageTreeViewTest.php b/typo3/sysext/impexp/Tests/Functional/Export/ExportPageTreeViewTest.php index f9bc56dbd6ea..d249724e56d0 100644 --- a/typo3/sysext/impexp/Tests/Functional/Export/ExportPageTreeViewTest.php +++ b/typo3/sysext/impexp/Tests/Functional/Export/ExportPageTreeViewTest.php @@ -51,7 +51,7 @@ class ExportPageTreeViewTest extends AbstractImportExportTestCase $this->importCSVDataSet(__DIR__ . '/../Fixtures/DatabaseImports/irre_tutorial.csv'); - $exportPageTreeView = $this->getAccessibleMock(ExportPageTreeView::class, ['dummy']); + $exportPageTreeView = $this->getAccessibleMock(ExportPageTreeView::class, null); GeneralUtility::addInstance(ExportPageTreeView::class, $exportPageTreeView); $subject = $this->getAccessibleMock(Export::class, [ diff --git a/typo3/sysext/impexp/Tests/Functional/ImportTest.php b/typo3/sysext/impexp/Tests/Functional/ImportTest.php index e83dc110162d..91786338f437 100644 --- a/typo3/sysext/impexp/Tests/Functional/ImportTest.php +++ b/typo3/sysext/impexp/Tests/Functional/ImportTest.php @@ -43,7 +43,7 @@ class ImportTest extends AbstractImportExportTestCase { $filePath = str_replace('%EnvironmentPublicPath%', Environment::getPublicPath(), $filePath); - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->loadFile($filePath); self::assertTrue(true); @@ -81,7 +81,7 @@ class ImportTest extends AbstractImportExportTestCase { $renderPreviewImport = include __DIR__ . '/Fixtures/ArrayAssertions/RenderPreviewImportPageAndRecords.php'; - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile('EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml'); $previewData = $importMock->renderPreview(); @@ -102,7 +102,7 @@ class ImportTest extends AbstractImportExportTestCase { $renderPreviewImport = include __DIR__ . '/Fixtures/ArrayAssertions/RenderPreviewImportPageAndRecordsByUpdate.php'; - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile('EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml'); $importMock->importData(); @@ -125,7 +125,7 @@ class ImportTest extends AbstractImportExportTestCase { $renderPreviewImport = include __DIR__ . '/Fixtures/ArrayAssertions/RenderPreviewImportPageAndRecordsWithDiff.php'; - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile('EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml'); $importMock->importData(); @@ -149,7 +149,7 @@ class ImportTest extends AbstractImportExportTestCase { $renderPreviewImport = include __DIR__ . '/Fixtures/ArrayAssertions/RenderPreviewImportPageAndRecordsByUpdateWithDiff.php'; - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile('EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent.xml'); $importMock->importData(); @@ -174,7 +174,7 @@ class ImportTest extends AbstractImportExportTestCase { $renderPreviewImport = include __DIR__ . '/Fixtures/ArrayAssertions/RenderPreviewImportPageAndRecordsWithSoftRefs.php'; - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile('EXT:impexp/Tests/Functional/Fixtures/XmlImports/pages-and-ttcontent-with-softrefs.xml'); $previewData = $importMock->renderPreview(); @@ -246,7 +246,7 @@ class ImportTest extends AbstractImportExportTestCase */ public function loadXmlSucceeds(): void { - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile( 'EXT:impexp/Tests/Functional/Fixtures/XmlExports/empty.xml', @@ -260,7 +260,7 @@ class ImportTest extends AbstractImportExportTestCase */ public function loadT3dSucceeds(): void { - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile( 'EXT:impexp/Tests/Functional/Fixtures/T3dExports/empty.t3d', @@ -276,7 +276,7 @@ class ImportTest extends AbstractImportExportTestCase { $this->expectException(LoadingFileFailedException::class); - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile( 'EXT:impexp/Tests/Functional/Fixtures/T3dExports/empty-with-wrong-checksum.t3d', @@ -293,7 +293,7 @@ class ImportTest extends AbstractImportExportTestCase self::markTestSkipped('The function gzuncompress() is not available for decompression.'); } - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); $importMock->loadFile( 'EXT:impexp/Tests/Functional/Fixtures/T3dExports/empty-z.t3d', @@ -310,7 +310,7 @@ class ImportTest extends AbstractImportExportTestCase $fileDirectory = Environment::getVarPath() . '/transient'; $numTemporaryFilesAndFoldersBeforeImport = iterator_count(new \FilesystemIterator($fileDirectory, \FilesystemIterator::SKIP_DOTS)); - $importMock = $this->getAccessibleMock(Import::class, ['dummy']); + $importMock = $this->getAccessibleMock(Import::class, null); $importMock->setPid(0); // Simulation of import of TCA field type=group with internal_type=file // which is not supported anymore since TYPO3 v10 but there are still remains in EXT:impexp. diff --git a/typo3/sysext/impexp/Tests/Unit/ExportTest.php b/typo3/sysext/impexp/Tests/Unit/ExportTest.php index c261854d75b9..d7ea3c641a63 100644 --- a/typo3/sysext/impexp/Tests/Unit/ExportTest.php +++ b/typo3/sysext/impexp/Tests/Unit/ExportTest.php @@ -36,7 +36,7 @@ class ExportTest extends UnitTestCase protected function setUp(): void { parent::setUp(); - $this->exportMock = $this->getAccessibleMock(Export::class, ['dummy'], [], '', false); + $this->exportMock = $this->getAccessibleMock(Export::class, null, [], '', false); $this->exportMock->_set('compressionAvailable', true); } diff --git a/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/SysRedirectRootPageMoveMigrationTest.php b/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/SysRedirectRootPageMoveMigrationTest.php index 267be01ca4da..92aacc42ceb5 100644 --- a/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/SysRedirectRootPageMoveMigrationTest.php +++ b/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/SysRedirectRootPageMoveMigrationTest.php @@ -45,7 +45,7 @@ class SysRedirectRootPageMoveMigrationTest extends FunctionalTestCase parent::setUp(); $this->actionService = GeneralUtility::makeInstance(ActionService::class); // Register only WorkspaceNewPlaceholderRemovalMigration in the row updater wizard - $this->subject = $this->getAccessibleMock(DatabaseRowsUpdateWizard::class, ['dummy']); + $this->subject = $this->getAccessibleMock(DatabaseRowsUpdateWizard::class, null); $this->subject->_set('rowUpdater', [SysRedirectRootPageMoveMigration::class]); } diff --git a/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/WorkspaceNewPlaceholderRemovalTest.php b/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/WorkspaceNewPlaceholderRemovalTest.php index 5ce655be4ad0..b5ecf9ceb7b6 100644 --- a/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/WorkspaceNewPlaceholderRemovalTest.php +++ b/typo3/sysext/install/Tests/Functional/Updates/RowUpdater/WorkspaceNewPlaceholderRemovalTest.php @@ -45,7 +45,7 @@ class WorkspaceNewPlaceholderRemovalTest extends FunctionalTestCase parent::setUp(); $this->actionService = GeneralUtility::makeInstance(ActionService::class); // Register only WorkspaceNewPlaceholderRemovalMigration in the row updater wizard - $this->subject = $this->getAccessibleMock(DatabaseRowsUpdateWizard::class, ['dummy']); + $this->subject = $this->getAccessibleMock(DatabaseRowsUpdateWizard::class, null); $this->subject->_set('rowUpdater', [WorkspaceNewPlaceholderRemovalMigration::class]); } diff --git a/typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php b/typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php index a40996bd1c63..aa7c97de4db8 100644 --- a/typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php +++ b/typo3/sysext/install/Tests/Unit/FolderStructure/AbstractNodeTest.php @@ -35,7 +35,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getNameReturnsSetName(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $name = StringUtility::getUniqueId('name_'); $node->_set('name', $name); self::assertSame($name, $node->getName()); @@ -46,7 +46,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getTargetPermissionReturnsSetTargetPermission(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $permission = '1234'; $node->_set('targetPermission', $permission); self::assertSame($permission, $node->_call('getTargetPermission')); @@ -57,7 +57,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getChildrenReturnsSetChildren(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $children = ['1234']; $node->_set('children', $children); self::assertSame($children, $node->_call('getChildren')); @@ -68,7 +68,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getParentReturnsSetParent(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $node->_set('parent', $parent); self::assertSame($parent, $node->_call('getParent')); @@ -79,7 +79,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getAbsolutePathCallsParentForPathAndAppendsOwnName(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $parentPath = '/foo/bar'; $parent->expects(self::once())->method('getAbsolutePath')->willReturn($parentPath); @@ -94,7 +94,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function isWritableCallsParentIsWritable(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $parentMock = $this->createMock(NodeInterface::class); $parentMock->expects(self::once())->method('isWritable'); $node->_set('parent', $parentMock); @@ -106,7 +106,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function isWritableReturnsWritableStatusOfParent(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $parentMock = $this->createMock(NodeInterface::class); $parentMock->expects(self::once())->method('isWritable')->willReturn(true); $node->_set('parent', $parentMock); @@ -253,7 +253,7 @@ class AbstractNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366398198); - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $node->_call('getRelativePathBelowSiteRoot', '/tmp'); } @@ -278,7 +278,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getRelativePathBelowSiteRootReturnsSingleForwardSlashIfGivenPathEqualsPathSiteConstant(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $result = $node->_call('getRelativePathBelowSiteRoot', Environment::getPublicPath() . '/'); self::assertSame('/', $result); } @@ -288,7 +288,7 @@ class AbstractNodeTest extends FolderStructureTestCase */ public function getRelativePathBelowSiteRootReturnsSubPath(): void { - $node = $this->getAccessibleMock(AbstractNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(AbstractNode::class, null, [], '', false); $result = $node->_call('getRelativePathBelowSiteRoot', Environment::getPublicPath() . '/foo/bar'); self::assertSame('/foo/bar', $result); } diff --git a/typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php b/typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php index 38188f9b78b4..c3739460f730 100644 --- a/typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php +++ b/typo3/sysext/install/Tests/Unit/FolderStructure/DirectoryNodeTest.php @@ -82,7 +82,7 @@ class DirectoryNodeTest extends FolderStructureTestCase public function constructorSetsParent(): void { $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $structure = [ 'name' => 'foo', ]; @@ -96,7 +96,7 @@ class DirectoryNodeTest extends FolderStructureTestCase public function constructorSetsTargetPermission(): void { $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $targetPermission = '2550'; $structure = [ 'name' => 'foo', @@ -451,7 +451,7 @@ class DirectoryNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366222204); - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $brokenStructure = [ [ 'name' => 'foo', @@ -467,7 +467,7 @@ class DirectoryNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366222205); - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $brokenStructure = [ [ 'type' => 'foo', @@ -483,7 +483,7 @@ class DirectoryNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366222206); - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $brokenStructure = [ [ 'type' => DirectoryNode::class, @@ -502,7 +502,7 @@ class DirectoryNodeTest extends FolderStructureTestCase */ public function getChildrenReturnsCreatedChild(): void { - $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false); $parent = $this->createMock(NodeInterface::class); $childName = StringUtility::getUniqueId('test_'); $structure = [ diff --git a/typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php b/typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php index 405045cdfc7d..519b82450389 100644 --- a/typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php +++ b/typo3/sysext/install/Tests/Unit/FolderStructure/FileNodeTest.php @@ -38,7 +38,7 @@ class FileNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366927513); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $node->__construct([], null); } @@ -50,7 +50,7 @@ class FileNodeTest extends FolderStructureTestCase $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1366222207); $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $structure = [ 'name' => 'foo/bar', ]; @@ -63,7 +63,7 @@ class FileNodeTest extends FolderStructureTestCase public function constructorSetsParent(): void { $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $structure = [ 'name' => 'foo', ]; @@ -77,7 +77,7 @@ class FileNodeTest extends FolderStructureTestCase public function constructorSetsTargetPermission(): void { $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $targetPermission = '0660'; $structure = [ 'name' => 'foo', @@ -92,7 +92,7 @@ class FileNodeTest extends FolderStructureTestCase */ public function constructorSetsName(): void { - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $name = StringUtility::getUniqueId('test_'); $node->__construct(['name' => $name], $parent); @@ -106,7 +106,7 @@ class FileNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1380364361); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $structure = [ 'name' => 'foo', @@ -121,7 +121,7 @@ class FileNodeTest extends FolderStructureTestCase */ public function constructorSetsTargetContent(): void { - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $targetContent = StringUtility::getUniqueId('content_'); $structure = [ @@ -137,7 +137,7 @@ class FileNodeTest extends FolderStructureTestCase */ public function constructorSetsTargetContentToContentOfTargetContentFile(): void { - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $targetFile = $this->getTestFilePath('test_'); $targetContent = StringUtility::getUniqueId('content_'); @@ -157,7 +157,7 @@ class FileNodeTest extends FolderStructureTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1380364362); - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $targetFile = $this->getTestFilePath('test_'); $structure = [ @@ -172,7 +172,7 @@ class FileNodeTest extends FolderStructureTestCase */ public function targetContentIsNullIfNotGiven(): void { - $node = $this->getAccessibleMock(FileNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(FileNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $structure = [ 'name' => 'foo', diff --git a/typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php b/typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php index 659a86e98ff8..b2f6ddc9947d 100644 --- a/typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php +++ b/typo3/sysext/install/Tests/Unit/FolderStructure/LinkNodeTest.php @@ -47,7 +47,7 @@ class LinkNodeTest extends UnitTestCase { $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1380485700); - $node = $this->getAccessibleMock(LinkNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(LinkNode::class, null, [], '', false); $node->__construct([], null); } @@ -59,7 +59,7 @@ class LinkNodeTest extends UnitTestCase $this->expectException(InvalidArgumentException::class); $this->expectExceptionCode(1380546061); $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(LinkNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(LinkNode::class, null, [], '', false); $structure = [ 'name' => 'foo/bar', ]; @@ -72,7 +72,7 @@ class LinkNodeTest extends UnitTestCase public function constructorSetsParent(): void { $parent = $this->createMock(NodeInterface::class); - $node = $this->getAccessibleMock(LinkNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(LinkNode::class, null, [], '', false); $structure = [ 'name' => 'foo', ]; @@ -85,7 +85,7 @@ class LinkNodeTest extends UnitTestCase */ public function constructorSetsName(): void { - $node = $this->getAccessibleMock(LinkNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(LinkNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $name = StringUtility::getUniqueId('test_'); $node->__construct(['name' => $name], $parent); @@ -97,7 +97,7 @@ class LinkNodeTest extends UnitTestCase */ public function constructorSetsNameAndTarget(): void { - $node = $this->getAccessibleMock(LinkNode::class, ['dummy'], [], '', false); + $node = $this->getAccessibleMock(LinkNode::class, null, [], '', false); $parent = $this->createMock(RootNodeInterface::class); $name = StringUtility::getUniqueId('test_'); $target = '../' . StringUtility::getUniqueId('test_'); diff --git a/typo3/sysext/install/Tests/Unit/FolderStructure/StructureFacadeTest.php b/typo3/sysext/install/Tests/Unit/FolderStructure/StructureFacadeTest.php index e14472f9999e..8c357f234f23 100644 --- a/typo3/sysext/install/Tests/Unit/FolderStructure/StructureFacadeTest.php +++ b/typo3/sysext/install/Tests/Unit/FolderStructure/StructureFacadeTest.php @@ -29,7 +29,7 @@ class StructureFacadeTest extends UnitTestCase */ public function getStatusReturnsStatusOfStructureAndReturnsItsResult(): void { - $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false); + $facade = $this->getAccessibleMock(StructureFacade::class, null, [], '', false); $root = $this->createMock(RootNode::class); $root->expects(self::once())->method('getStatus')->willReturn([]); $facade->_set('structure', $root); @@ -42,7 +42,7 @@ class StructureFacadeTest extends UnitTestCase */ public function fixCallsFixOfStructureAndReturnsItsResult(): void { - $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false); + $facade = $this->getAccessibleMock(StructureFacade::class, null, [], '', false); $root = $this->createMock(RootNode::class); $root->expects(self::once())->method('fix')->willReturn([]); $facade->_set('structure', $root); diff --git a/typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php b/typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php index b6d078cda39d..1aeaefb49bef 100644 --- a/typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php +++ b/typo3/sysext/install/Tests/Unit/Service/CoreUpdateServiceTest.php @@ -28,7 +28,7 @@ class CoreUpdateServiceTest extends UnitTestCase */ public function getMessagesReturnsPreviouslySetMessage(): void { - $instance = $this->getAccessibleMock(CoreUpdateService::class, ['dummy'], [], '', false); + $instance = $this->getAccessibleMock(CoreUpdateService::class, null, [], '', false); $aMessage = new FlashMessageQueue('install'); $instance->_set('messages', $aMessage); self::assertSame($aMessage, $instance->getMessages()); @@ -42,7 +42,7 @@ class CoreUpdateServiceTest extends UnitTestCase if (defined('TYPO3_COMPOSER_MODE') && TYPO3_COMPOSER_MODE) { self::markTestSkipped('This test is only available in Non-Composer mode.'); } - $instance = $this->getAccessibleMock(CoreUpdateService::class, ['dummy'], [], '', false); + $instance = $this->getAccessibleMock(CoreUpdateService::class, null, [], '', false); putenv('TYPO3_DISABLE_CORE_UPDATER'); putenv('REDIRECT_TYPO3_DISABLE_CORE_UPDATER'); self::assertTrue($instance->isCoreUpdateEnabled()); @@ -53,7 +53,7 @@ class CoreUpdateServiceTest extends UnitTestCase */ public function isCoreUpdateEnabledReturnsFalseFor_TYPO3_DISABLE_CORE_UPDATER_EnvironmentVariableSet(): void { - $instance = $this->getAccessibleMock(CoreUpdateService::class, ['dummy'], [], '', false); + $instance = $this->getAccessibleMock(CoreUpdateService::class, null, [], '', false); putenv('TYPO3_DISABLE_CORE_UPDATER=1'); putenv('REDIRECT_TYPO3_DISABLE_CORE_UPDATER'); self::assertFalse($instance->isCoreUpdateEnabled()); @@ -64,7 +64,7 @@ class CoreUpdateServiceTest extends UnitTestCase */ public function isCoreUpdateEnabledReturnsFalseFor_REDIRECT_TYPO3_DISABLE_CORE_UPDATER_EnvironmentVariableSet(): void { - $instance = $this->getAccessibleMock(CoreUpdateService::class, ['dummy'], [], '', false); + $instance = $this->getAccessibleMock(CoreUpdateService::class, null, [], '', false); putenv('TYPO3_DISABLE_CORE_UPDATER'); putenv('REDIRECT_TYPO3_DISABLE_CORE_UPDATER=1'); self::assertFalse($instance->isCoreUpdateEnabled()); diff --git a/typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php b/typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php index 62d3c775c3d0..6832ef5dee90 100644 --- a/typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php +++ b/typo3/sysext/install/Tests/Unit/Service/CoreVersionServiceTest.php @@ -225,7 +225,7 @@ class CoreVersionServiceTest extends UnitTestCase ] ); - $instance = $this->getAccessibleMock(CoreVersionService::class, ['dummy']); + $instance = $this->getAccessibleMock(CoreVersionService::class, null); $result = $instance->getSupportedMajorReleases(); $expectation = [ diff --git a/typo3/sysext/lowlevel/Tests/Functional/Database/QueryGeneratorTest.php b/typo3/sysext/lowlevel/Tests/Functional/Database/QueryGeneratorTest.php index 8fb839ac4e19..04f1be51b1d1 100644 --- a/typo3/sysext/lowlevel/Tests/Functional/Database/QueryGeneratorTest.php +++ b/typo3/sysext/lowlevel/Tests/Functional/Database/QueryGeneratorTest.php @@ -42,7 +42,7 @@ class QueryGeneratorTest extends FunctionalTestCase { $id = 1; $depth = 0; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertEquals($id, $treeList); } @@ -54,7 +54,7 @@ class QueryGeneratorTest extends FunctionalTestCase { $id = 0; $depth = 1; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertEquals($id, $treeList); } @@ -66,7 +66,7 @@ class QueryGeneratorTest extends FunctionalTestCase { $id = -1; $depth = 0; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertEquals(1, $treeList); } @@ -79,7 +79,7 @@ class QueryGeneratorTest extends FunctionalTestCase $id = 0; $depth = 0; $begin = 1; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth, $begin); self::assertSame('', $treeList); } @@ -91,7 +91,7 @@ class QueryGeneratorTest extends FunctionalTestCase { $id = 1; $depth = 1; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertEquals($id, $treeList); } @@ -104,7 +104,7 @@ class QueryGeneratorTest extends FunctionalTestCase $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeStraightTreeSet.csv'); $id = 1; $depth = 99; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth, 0, 'hidden=0'); self::assertSame('1,2,3,4,5', $treeList); } @@ -116,7 +116,7 @@ class QueryGeneratorTest extends FunctionalTestCase public function getTreeListReturnsListOfIdsWithBeginSetToZero(int $id, int $depth, string $expectation): void { $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeStraightTreeSet.csv'); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertSame($expectation, $treeList); } @@ -155,7 +155,7 @@ class QueryGeneratorTest extends FunctionalTestCase public function getTreeListReturnsListOfIdsWithBeginSetToMinusOne(int $id, int $depth, string $expectation): void { $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeStraightTreeSet.csv'); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth, -1); self::assertSame($expectation, $treeList); } @@ -195,7 +195,7 @@ class QueryGeneratorTest extends FunctionalTestCase $id = 1; $depth = 3; $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeBranchedTreeSet.csv'); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth); self::assertSame('1,2,3,4,5', $treeList); } @@ -209,7 +209,7 @@ class QueryGeneratorTest extends FunctionalTestCase $depth = 3; $begin = 1; $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeBranchedTreeSet.csv'); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth, $begin); self::assertSame('2,3,4,5', $treeList); } @@ -223,7 +223,7 @@ class QueryGeneratorTest extends FunctionalTestCase $depth = 3; $begin = 2; $this->importCSVDataSet(__DIR__ . '/Fixtures/TestGetPageTreeBranchedTreeSet.csv'); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $treeList = $subject->_call('getTreeList', $id, $depth, $begin); self::assertSame('3,5', $treeList); } @@ -294,7 +294,7 @@ class QueryGeneratorTest extends FunctionalTestCase 'inputValue1' => $inputValue1, ], ]; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $subject->_call('init', 'queryConfig', 'aTable'); self::assertSame($expected, trim($subject->_call('getQuery', $inputConf), "\n\r")); } @@ -309,7 +309,7 @@ class QueryGeneratorTest extends FunctionalTestCase // ' ECT 'INJ %quoteCharacter%%commentStart% %commentEnd%%quoteCharacter% ECT', ]; - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $comparisons = array_keys($subject->_get('compSQL')); foreach ($injectors as $injector) { foreach ($comparisons as $comparison) { @@ -366,7 +366,7 @@ class QueryGeneratorTest extends FunctionalTestCase $iconFactoryMock = $this->getMockBuilder(IconFactory::class)->disableOriginalConstructor()->getMock(); $iconFactoryMock->method('getIcon')->willReturn($iconMock); - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); $subject->_set('iconFactory', $iconFactoryMock); $subject->_call('init', 'queryConfig', $settings['queryTable']); $subject->_call('makeSelectorTable', $settings); diff --git a/typo3/sysext/lowlevel/Tests/Unit/Database/QueryGeneratorTest.php b/typo3/sysext/lowlevel/Tests/Unit/Database/QueryGeneratorTest.php index 366493baf9c9..da9d50c02d0e 100644 --- a/typo3/sysext/lowlevel/Tests/Unit/Database/QueryGeneratorTest.php +++ b/typo3/sysext/lowlevel/Tests/Unit/Database/QueryGeneratorTest.php @@ -110,7 +110,7 @@ class QueryGeneratorTest extends UnitTestCase */ public function getSubscriptReturnsExpectedValues($input, array $expectedArray): void { - $subject = $this->getAccessibleMock(QueryGenerator::class, ['dummy'], [], '', false); + $subject = $this->getAccessibleMock(QueryGenerator::class, null, [], '', false); self::assertSame($expectedArray, $subject->_call('getSubscript', $input)); } } -- GitLab