diff --git a/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php b/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php index 2b5739c728..46deb0860e 100644 --- a/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php +++ b/Tests/Unit/Resource/Collection/FileCollectionRegistryTest.php @@ -18,7 +18,7 @@ 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 @@ public function registerFileCollectionClassThrowsExceptionIfTypeIsAlreadyRegiste $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 @@ public function registerFileCollectionClassThrowsExceptionIfTypeIsAlreadyRegiste 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/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php b/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php new file mode 100644 index 0000000000..95a2db1731 --- /dev/null +++ b/Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php @@ -0,0 +1,33 @@ +