Skip to content

Commit

Permalink
[TASK] Make FormManagerControllerTest notice free
Browse files Browse the repository at this point in the history
Releases: master
Resolves: #84394
Change-Id: I9c506e7f85fb1fc1c3e2108d485004911abe4daa
Reviewed-on: https://review.typo3.org/56269
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
janhelke authored and lolli42 committed Mar 17, 2018
1 parent c1d61b8 commit cd210dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ protected function getFormManagerAppInitialData(): string
$formManagerAppInitialData = ArrayUtility::reIndexNumericArrayKeysRecursive($formManagerAppInitialData);
$formManagerAppInitialData = TranslationService::getInstance()->translateValuesRecursive(
$formManagerAppInitialData,
$this->formSettings['formManager']['translationFile']
$this->formSettings['formManager']['translationFile'] ?? null
);
return json_encode($formManagerAppInitialData);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types = 1);
namespace TYPO3\CMS\Form\Tests\Unit\Controller;

/*
Expand Down Expand Up @@ -33,11 +34,6 @@
*/
class FormManagerControllerTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;

/**
* @var array A backup of registered singleton instances
*/
Expand All @@ -54,7 +50,7 @@ public function setUp()
/**
* Tear down
*/
public function tearDown()
public function tearDown(): void
{
GeneralUtility::resetSingletonInstances($this->singletonInstances);
parent::tearDown();
Expand All @@ -63,7 +59,7 @@ public function tearDown()
/**
* @test
*/
public function getAccessibleFormStorageFoldersReturnsProcessedArray()
public function getAccessibleFormStorageFoldersReturnsProcessedArray(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand Down Expand Up @@ -120,7 +116,7 @@ public function getAccessibleFormStorageFoldersReturnsProcessedArray()
/**
* @test
*/
public function getFormManagerAppInitialDataReturnsProcessedArray()
public function getFormManagerAppInitialDataReturnsProcessedArray(): void
{
$objectManagerProphecy = $this->prophesize(ObjectManager::class);
GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerProphecy->reveal());
Expand Down Expand Up @@ -193,7 +189,7 @@ public function getFormManagerAppInitialDataReturnsProcessedArray()
/**
* @test
*/
public function getAvailableFormDefinitionsReturnsProcessedArray()
public function getAvailableFormDefinitionsReturnsProcessedArray(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'getReferences'
Expand Down Expand Up @@ -241,7 +237,7 @@ public function getAvailableFormDefinitionsReturnsProcessedArray()
/**
* @test
*/
public function getProcessedReferencesRowsThrowsExceptionIfPersistenceIdentifierIsEmpty()
public function getProcessedReferencesRowsThrowsExceptionIfPersistenceIdentifierIsEmpty(): void
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionCode(1477071939);
Expand Down Expand Up @@ -312,7 +308,7 @@ public function getProcessedReferencesRowsReturnsProcessedArray()
/**
* @test
*/
public function isValidTemplatePathReturnsTrueIfTemplateIsDefinedAndExists()
public function isValidTemplatePathReturnsTrueIfTemplateIsDefinedAndExists(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand Down Expand Up @@ -345,7 +341,7 @@ public function isValidTemplatePathReturnsTrueIfTemplateIsDefinedAndExists()
/**
* @test
*/
public function isValidTemplatePathReturnsFalseIfTemplateIsDefinedButNotExists()
public function isValidTemplatePathReturnsFalseIfTemplateIsDefinedButNotExists(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand Down Expand Up @@ -378,7 +374,7 @@ public function isValidTemplatePathReturnsFalseIfTemplateIsDefinedButNotExists()
/**
* @test
*/
public function isValidTemplatePathReturnsFalseIfTemplateIsNotDefinedAndExists()
public function isValidTemplatePathReturnsFalseIfTemplateIsNotDefinedAndExists(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand Down Expand Up @@ -421,7 +417,7 @@ public function isValidTemplatePathReturnsFalseIfTemplateIsNotDefinedAndExists()
/**
* @test
*/
public function convertFormNameToIdentifierRemoveSpaces()
public function convertFormNameToIdentifierRemoveSpaces(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand All @@ -435,7 +431,7 @@ public function convertFormNameToIdentifierRemoveSpaces()
/**
* @test
*/
public function convertFormNameToIdentifierRemoveSpecialChars()
public function convertFormNameToIdentifierRemoveSpecialChars(): void
{
$mockController = $this->getAccessibleMock(FormManagerController::class, [
'dummy'
Expand Down

0 comments on commit cd210dd

Please sign in to comment.