diff --git a/typo3/sysext/core/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php b/typo3/sysext/core/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php index 2b5739c728bf4ad94ef74128313ed3f1b62c50bc..46deb0860e9830bfbd272a96bcebe9ec28475fec 100644 --- a/typo3/sysext/core/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php +++ b/typo3/sysext/core/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); namespace TYPO3\CMS\Core\Tests\Unit\Resource\Collection; use TYPO3\CMS\Core\Resource\Collection\FileCollectionRegistry; -use TYPO3\CMS\Core\Resource\Collection\StaticFileCollection; +use TYPO3\CMS\Core\Tests\Unit\Resource\Collection\Fixtures\OtherTestingFileCollection; use TYPO3\CMS\Core\Tests\Unit\Resource\Collection\Fixtures\TestingFileCollection; use TYPO3\CMS\Core\Utility\StringUtility; use TYPO3\TestingFramework\Core\Unit\UnitTestCase; @@ -70,7 +70,7 @@ final class FileCollectionRegistryTest extends UnitTestCase $this->expectExceptionCode(1391295643); $subject = new FileCollectionRegistry(); $className = TestingFileCollection::class; - $className2 = get_class($this->getMockForAbstractClass(StaticFileCollection::class)); + $className2 = OtherTestingFileCollection::class; $subject->registerFileCollectionClass($className, 'foobar'); $subject->registerFileCollectionClass($className2, 'foobar'); } @@ -81,7 +81,7 @@ final class FileCollectionRegistryTest extends UnitTestCase public function registerFileCollectionClassOverridesExistingRegisteredFileCollectionClass(): void { $className = TestingFileCollection::class; - $className2 = get_class($this->getMockForAbstractClass(StaticFileCollection::class)); + $className2 = OtherTestingFileCollection::class; $subject = new FileCollectionRegistry(); $subject->registerFileCollectionClass($className, 'foobar'); $subject->registerFileCollectionClass($className2, 'foobar', true); diff --git a/typo3/sysext/core/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php b/typo3/sysext/core/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php new file mode 100644 index 0000000000000000000000000000000000000000..95a2db1731f74bd8e80d653ae40990887c9dc310 --- /dev/null +++ b/typo3/sysext/core/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php @@ -0,0 +1,33 @@ +<?php + +declare(strict_types=1); + +/* + * This file is part of the TYPO3 CMS project. + * + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * The TYPO3 project - inspiring people to share! + */ + +namespace TYPO3\CMS\Core\Tests\Unit\Resource\Collection\Fixtures; + +use TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection; + +/** + * Testing subclass of the abstract class. + * + * This class exists because some tests need instances of different file collection classes. + */ +final class OtherTestingFileCollection extends AbstractFileCollection +{ + public function loadContents(): void + { + // stub + } +}