Commit e514f439 authored by Christian Kuhn's avatar Christian Kuhn Committed by Markus Klein
Browse files

[!!!][TASK] Handle E_NOTICE free unit tests

Raise typo3/testing-framework from 2.0.4 to 3.0.0:
composer require --dev typo3/testing-framework ^3.0

The new typo3/testing-framework version comes with a change
that no longer suppresses E_NOTICE PHP errors by default and lets
tests fail that raise them.

The static property $suppressNotices in unit test files is set to
true for all test cases that currently raise E_NOTICE errors to
suppress them on a by-file basis.

Further patches should remove this property one-by-one again by
fixing the system under test the unit test case handles.

Change-Id: I7d44fe3723ce5820a37051ae31f16b2f142ffba6
Resolves: #83889
Related: #83888
Releases: master
Reviewed-on: https://review.typo3.org/55697


Reviewed-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
parent e9960705
......@@ -62,7 +62,7 @@
"friendsofphp/php-cs-fixer": "^2.0",
"fiunchinho/phpunit-randomizer": "~3.0.0",
"typo3/cms-styleguide": "~9.0.1",
"typo3/testing-framework": "^2.0.3"
"typo3/testing-framework": "^3.0"
},
"suggest": {
"ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "404f780d81028713a93bcb93bdfc3d69",
"content-hash": "2bd96e5071eb99b24b31261e2e03e4aa",
"packages": [
{
"name": "cogpowered/finediff",
......@@ -4414,31 +4414,31 @@
},
{
"name": "typo3/testing-framework",
"version": "2.0.4",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/TYPO3/testing-framework.git",
"reference": "602e59f8d80f83c006566ade6037875ecba30353"
"reference": "0793e458c801f746c8da55453d8c98744d477ede"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/602e59f8d80f83c006566ade6037875ecba30353",
"reference": "602e59f8d80f83c006566ade6037875ecba30353",
"url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/0793e458c801f746c8da55453d8c98744d477ede",
"reference": "0793e458c801f746c8da55453d8c98744d477ede",
"shasum": ""
},
"require": {
"mikey179/vfsstream": "~1.6.0",
"phpunit/phpunit": "^6.2",
"typo3/cms-backend": "^8.5 || ^9",
"typo3/cms-core": "^8.5 || ^9",
"typo3/cms-extbase": "^8.5 || ^9",
"typo3/cms-fluid": "^8.5 || ^9",
"typo3/cms-frontend": "^8.5 || ^9",
"typo3/cms-backend": "^9",
"typo3/cms-core": "^9",
"typo3/cms-extbase": "^9",
"typo3/cms-fluid": "^9",
"typo3/cms-frontend": "^9",
"typo3fluid/fluid": "^2.2"
},
"suggest": {
"codeception/codeception": "^2.2",
"typo3/cms-saltedpasswords": "^8.5",
"typo3/cms-saltedpasswords": "^9",
"typo3/cms-styleguide": "~8.0.8"
},
"type": "library",
......@@ -4472,7 +4472,7 @@
"tests",
"typo3"
],
"time": "2018-02-13T16:14:26+00:00"
"time": "2018-02-13T22:48:10+00:00"
},
{
"name": "webmozart/assert",
......
......@@ -24,6 +24,11 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
*/
class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
......
......@@ -25,6 +25,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
......
......@@ -26,6 +26,11 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/
class ListOfFieldsContainerTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
......
......@@ -28,6 +28,11 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/
class PaletteAndSingleContainerTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;
*/
class AbstractFormElementTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @return array
*/
......
......@@ -25,6 +25,11 @@ use TYPO3\CMS\Core\Localization\LanguageService;
*/
class InputDateTimeElementTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var string Selected timezone backup
*/
......
......@@ -22,6 +22,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseDefaultLanguagePageRow;
*/
class DatabaseDefaultLanguagePageRowTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var DatabaseDefaultLanguagePageRow|\PHPUnit_Framework_MockObject_MockObject
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRecordTypeValue;
*/
class DatabaseRecordTypeValueTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var DatabaseRecordTypeValue|\PHPUnit_Framework_MockObject_MockObject
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew;
*/
class DatabaseRowInitializeNewTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var DatabaseRowInitializeNew
*/
......
......@@ -33,6 +33,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class DatabaseSystemLanguageRowsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var DatabaseSystemLanguageRows
*/
......
......@@ -32,6 +32,11 @@ use TYPO3\CMS\Core\Type\Bitmask\Permission;
*/
class DatabaseUserPermissionCheckTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var DatabaseUserPermissionCheck
*/
......
......@@ -25,6 +25,11 @@ use TYPO3\CMS\Core\Utility\ArrayUtility;
*/
class EvaluateDisplayConditionsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
......
......@@ -28,6 +28,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class TcaCheckboxItemsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaCheckboxItems
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessCommon;
*/
class TcaColumnsProcessCommonTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaColumnsProcessCommon
*/
......
......@@ -22,6 +22,11 @@ use TYPO3\CMS\Core\Localization\LanguageService;
*/
class TcaColumnsProcessFieldLabelsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaColumnsProcessFieldLabels
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessRecordTitle;
*/
class TcaColumnsProcessRecordTitleTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaColumnsProcessRecordTitle
*/
......
......@@ -21,6 +21,11 @@ use TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessShowitem;
*/
class TcaColumnsProcessShowitemTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaColumnsProcessShowitem
*/
......
......@@ -27,6 +27,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @var TcaFlexPrepare
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment