-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Migrate getAccessibleMockForAbstractClass for EXT:form controller
`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. This change also cleans up the affected test to better match the setup/execute/verify structure. Resolves: #102117 Related: #101601 Releases: main, 12.4 Change-Id: Iaa6cee9893d41cb95e20cda80e03f044d52d82cd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81350 Reviewed-by: Stefan Bürk <[email protected]> Tested-by: Stefan Bürk <[email protected]> Tested-by: core-ci <[email protected]>
- Loading branch information
1 parent
18b504c
commit 9488a42
Showing
2 changed files
with
38 additions
and
16 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
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,31 @@ | ||
<?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\Form\Tests\Unit\Controller\Fixtures; | ||
|
||
use TYPO3\CMS\Form\Controller\AbstractBackendController; | ||
|
||
/** | ||
* Testing subclass of the abstract class with some protected methods exposed as public. | ||
*/ | ||
final class TestingController extends AbstractBackendController | ||
{ | ||
public function resolveResourcePaths(array $resourcePaths): array | ||
{ | ||
return parent::resolveResourcePaths($resourcePaths); | ||
} | ||
} |