-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Migrate
getMockForAbstractClass()
calls in EXT:core
`getMockForAbstractClass` has been (soft-)deprecated in PHPUnit 10.1: sebastianbergmann/phpunit#5241 Hence, we should replace its usages to follow best practices and avoid deprecation warnings later with PHPUnit 11. We do this by creating dedicated fixture subclasses of the affected abstract classes. Resolves: #101666 Related: #101601 Releases: main Change-Id: I0263ff7b0639d72ba1d4f30e3bee12276d364591 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80526 Reviewed-by: Stefan B�rk <[email protected]> Tested-by: core-ci <[email protected]> Reviewed-by: Nikita Hovratov <[email protected]> Tested-by: Nikita Hovratov <[email protected]> Tested-by: Stefan B�rk <[email protected]>
- Loading branch information
1 parent
09217b2
commit 498dcf9
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
Tests/Unit/Resource/Collection/Fixtures/OtherTestingFileCollection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |