Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Avoid phpunit getMockForAbstractClass()
Deprecated with phpunit 11. Adapt to fixture classes to test details of abstracts. Resolves: #103228 Releases: main Change-Id: Ic0cd4541856beb45775d50d22b95be687888373a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83160 Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
- Loading branch information
Showing
10 changed files
with
371 additions
and
656 deletions.
There are no files selected for viewing
354 changes: 50 additions & 304 deletions
354
typo3/sysext/form/Tests/Unit/Domain/Finishers/AbstractFinisherTest.php
Large diffs are not rendered by default.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
typo3/sysext/form/Tests/Unit/Domain/Finishers/Fixtures/AbstractFinisherFixture.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,57 @@ | ||
<?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! | ||
*/ | ||
|
||
/* | ||
* Inspired by and partially taken from the Neos.Form package (www.neos.io) | ||
*/ | ||
|
||
namespace TYPO3\CMS\Form\Tests\Unit\Domain\Finishers\Fixtures; | ||
|
||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher; | ||
use TYPO3\CMS\Form\Domain\Runtime\FormRuntime; | ||
|
||
final class AbstractFinisherFixture extends AbstractFinisher | ||
{ | ||
public $options = []; | ||
public $defaultOptions = []; | ||
public $finisherContext; | ||
|
||
protected function executeInternal() | ||
{ | ||
return null; | ||
} | ||
|
||
public function parseOption(string $optionName) | ||
{ | ||
return parent::parseOption($optionName); | ||
} | ||
|
||
protected function translateFinisherOption( | ||
$subject, | ||
FormRuntime $formRuntime, | ||
string $optionName, | ||
$optionValue, | ||
array $translationOptions | ||
) { | ||
return $subject; | ||
} | ||
|
||
public function substituteRuntimeReferences($needle, FormRuntime $formRuntime) | ||
{ | ||
return parent::substituteRuntimeReferences($needle, $formRuntime); | ||
} | ||
} |
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
Oops, something went wrong.