[TASK] Make UnitDeprecated/ notice free 68/57068/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 15 Jun 2018 10:37:02 +0000 (12:37 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Fri, 15 Jun 2018 11:03:27 +0000 (13:03 +0200)
Releases: master
Resolves: #85097
Change-Id: I1eb8cb056350badf057e58fe4c0d5c22b3568133
Reviewed-on: https://review.typo3.org/57068
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Tests/UnitDeprecated/Html/RteHtmlParserTest.php
typo3/sysext/core/Tests/UnitDeprecated/Utility/ClientUtilityTest.php
typo3/sysext/extbase/Classes/Reflection/ClassSchema.php
typo3/sysext/extbase/Tests/UnitDeprecated/Reflection/ReflectionServiceTest.php
typo3/sysext/recordlist/Tests/UnitDeprecated/RecordList/AbstractDatabaseRecordListTest.php

index e6ada36..9a4bb69 100644 (file)
@@ -1,5 +1,6 @@
 <?php
-namespace TYPO3\CMS\Core\Tests\Unit_Deprecated\Html;
+declare(strict_types = 1);
+namespace TYPO3\CMS\Core\Tests\UnitDeprecated\Html;
 
 /*
  * This file is part of the TYPO3 CMS project.
@@ -14,6 +15,7 @@ namespace TYPO3\CMS\Core\Tests\Unit_Deprecated\Html;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Html\RteHtmlParser;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,18 +29,13 @@ class RteHtmlParserTest extends UnitTestCase
     protected $resetSingletonInstances = true;
 
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
-     * @var \TYPO3\CMS\Core\Html\RteHtmlParser
+     * @var RteHtmlParser
      */
     protected $subject = null;
 
-    protected function setUp()
+    protected function setUp(): void
     {
-        $this->subject = new \TYPO3\CMS\Core\Html\RteHtmlParser();
+        $this->subject = new RteHtmlParser();
         $this->subject->procOptions = [
             'allowTagsOutside' => 'hr, address',
             'overruleMode' => 'default'
@@ -48,7 +45,7 @@ class RteHtmlParserTest extends UnitTestCase
     /**
      * Data provider for linkWithAtSignCorrectlyTransformedOnWayToRTE
      */
-    public static function linkWithAtSignCorrectlyTransformedOnWayToRTEProvider()
+    public static function linkWithAtSignCorrectlyTransformedOnWayToRTEProvider(): array
     {
         return [
             'external url with @ sign' => [
@@ -65,8 +62,10 @@ class RteHtmlParserTest extends UnitTestCase
     /**
      * @test
      * @dataProvider linkWithAtSignCorrectlyTransformedOnWayToRTEProvider
+     * @param $content
+     * @param $expectedResult
      */
-    public function linkWithAtSignCorrectlyTransformedOnWayToRTE($content, $expectedResult)
+    public function linkWithAtSignCorrectlyTransformedOnWayToRTE(string $content, string $expectedResult): void
     {
         $thisConfig = ['proc.' => $this->subject->procOptions];
         $this->assertEquals($expectedResult, $this->subject->RTE_transform($content, [], 'rte', $thisConfig));
index 0b04792..b7e353d 100644 (file)
@@ -1,5 +1,6 @@
 <?php
-namespace TYPO3\CMS\Core\Tests\Unit\Utility;
+declare(strict_types = 1);
+namespace TYPO3\CMS\Core\Tests\UnitDeprecated\Utility;
 
 /*
  * This file is part of the TYPO3 CMS project.
@@ -14,16 +15,14 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\ClientUtility;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
 /**
  * Testcase for the \TYPO3\CMS\Core\Utility\ClientUtility class.
  */
-class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class ClientUtilityTest extends UnitTestCase
 {
-    /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
     //////////////////////////////////////////////////////////
     // Utility Functions
     //////////////////////////////////////////////////////////
@@ -37,11 +36,12 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     {
         $actual = $expected = [];
         foreach ($browserStrings as $browserString) {
-            $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($browserString);
+            $infoArray = ClientUtility::getBrowserInfo($browserString);
             $expected[] = $expectedMembers;
+            $explodedVersion = explode('.', $infoArray['version']);
             $actual[] = [
                 'browser' => $infoArray['browser'],
-                'version' => array_shift(explode('.', $infoArray['version']))
+                'version' => array_shift($explodedVersion)
             ];
         }
         $this->assertSame($expected, $actual);
@@ -208,7 +208,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function checkGeckoVersion()
     {
         $userAgentString = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertEquals('1.9.2.3', $infoArray['all']['gecko']);
     }
 
@@ -218,7 +218,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8()
     {
         $userAgentString = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('win8', $infoArray['all_systems']);
     }
 
@@ -228,7 +228,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows8rev1()
     {
         $userAgentString = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; Trident/6.0)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('win8', $infoArray['all_systems']);
     }
 
@@ -238,7 +238,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows7()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('win7', $infoArray['all_systems']);
     }
 
@@ -248,7 +248,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsVista()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('winVista', $infoArray['all_systems']);
     }
 
@@ -258,7 +258,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsXp()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('winXP', $infoArray['all_systems']);
     }
 
@@ -268,7 +268,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2k()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('win2k', $infoArray['all_systems']);
     }
 
@@ -278,7 +278,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2kServicePack1()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.01; SV1)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('win2k', $infoArray['all_systems']);
     }
 
@@ -288,7 +288,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsNt()
     {
         $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('winNT', $infoArray['all_systems']);
     }
 
@@ -298,7 +298,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpad()
     {
         $userAgentString = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('iOS', $infoArray['all_systems']);
     }
 
@@ -308,7 +308,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIphone()
     {
         $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('iOS', $infoArray['all_systems']);
     }
 
@@ -318,7 +318,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpod()
     {
         $userAgentString = 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Geckto) Version/3.0 Mobile/3A101a Safari/419.3';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('iOS', $infoArray['all_systems']);
     }
 
@@ -328,7 +328,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfMacOsX()
     {
         $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/534.15+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('mac', $infoArray['all_systems']);
     }
 
@@ -338,7 +338,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfLinux()
     {
         $userAgentString = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('linux', $infoArray['all_systems']);
     }
 
@@ -348,7 +348,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfSolaris()
     {
         $userAgentString = 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100525 Firefox/3.5.9';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('unix_sun', $infoArray['all_systems']);
     }
 
@@ -377,7 +377,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfAndroid($userAgentString)
     {
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('android', $infoArray['all_systems']);
     }
 
@@ -387,7 +387,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfOpenbsd()
     {
         $userAgentString = 'Links (1.00pre20; OpenBSD 4.8 i386; 80x25)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('unix_bsd', $infoArray['all_systems']);
     }
 
@@ -397,7 +397,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfNetbsd()
     {
         $userAgentString = 'Links (2.2; NetBSD 5.1 amd64; 80x25)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('unix_bsd', $infoArray['all_systems']);
     }
 
@@ -407,7 +407,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfFreebsd()
     {
         $userAgentString = 'Mozilla/5.0 (X11; U; FreeBSD amd64; c) AppleWebKit/531.2+ (KHTML, like Gecko) Safari 531.2+ Epiphany/230.2';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('unix_bsd', $infoArray['all_systems']);
     }
 
@@ -417,7 +417,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfChromeOs()
     {
         $userAgentString = 'Mozilla/5.0 (X11; U; CrOS i686  9.10.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.253.0 Safari 532.5';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertContains('chrome', $infoArray['all_systems']);
     }
 
@@ -427,7 +427,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfSafari()
     {
         $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('safari', $infoArray['browser']);
     }
 
@@ -437,7 +437,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfFirefox()
     {
         $userAgentString = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('firefox', $infoArray['browser']);
     }
 
@@ -447,7 +447,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfOpera()
     {
         $userAgentString = 'Opera/9.80 (X11; FreeBSD 8.1-RELEASE amd64; U; en) Presto/2.2.15 Version/10.10';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('opera', $infoArray['browser']);
     }
 
@@ -457,7 +457,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnAndroid()
     {
         $userAgentString = 'Mozilla/5.0 (Linux; U; Android WildPuzzleROM v8.0.7 froyo 2.2; de-de; HTC Wildfire Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('safari', $infoArray['browser']);
     }
 
@@ -467,7 +467,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnIphone()
     {
         $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('safari', $infoArray['browser']);
     }
 
@@ -477,7 +477,7 @@ class ClientUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfKonqueror()
     {
         $userAgentString = 'Mozilla/5.0 (compatible; Konqueror/4.4; FreeBSD) KHTML/4.4.5 (like Gecko)';
-        $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
+        $infoArray = ClientUtility::getBrowserInfo($userAgentString);
         $this->assertSame('konqueror', $infoArray['browser']);
     }
 }
index 80d4836..9ec32b5 100644 (file)
@@ -574,7 +574,9 @@ class ClassSchema
      */
     public function getProperty($propertyName)
     {
-        return is_array($this->properties[$propertyName]) ? $this->properties[$propertyName] : [];
+        return isset($this->properties[$propertyName]) && is_array($this->properties[$propertyName])
+            ? $this->properties[$propertyName]
+            : [];
     }
 
     /**
index ea69825..ce106dc 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Reflection;
  */
 
 use TYPO3\CMS\Extbase\Reflection\ReflectionService;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Test case
@@ -24,14 +25,9 @@ use TYPO3\CMS\Extbase\Reflection\ReflectionService;
  * @link second test for reflection
  * @link second test for reflection with second value
  */
-class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class ReflectionServiceTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @param array $foo The foo parameter
      * @return string
      */
index 17a9f89..38ee919 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Recordlist\Tests\UnitDeprecated\RecordList;
 
 /*
@@ -17,26 +18,23 @@ namespace TYPO3\CMS\Recordlist\Tests\UnitDeprecated\RecordList;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList;
+use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Test case
  */
-class AbstractDatabaseRecordListTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class AbstractDatabaseRecordListTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @test
      * @dataProvider setTableDisplayOrderConvertsStringsDataProvider
      * @param array $input
      * @param array $expected
      */
-    public function setTableDisplayOrderConvertsStringInput(array $input, array $expected)
+    public function setTableDisplayOrderConvertsStringInput(array $input, array $expected): void
     {
-        /** @var AbstractDatabaseRecordList|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface $subject */
+        /** @var AbstractDatabaseRecordList|\PHPUnit_Framework_MockObject_MockObject|AccessibleObjectInterface $subject */
         $subject = $this->getAccessibleMock(AbstractDatabaseRecordList::class, ['dummy'], [], '', false);
         $subject->setTableDisplayOrder($input);
         $this->assertSame($expected, $subject->_get('tableDisplayOrder'));
@@ -45,7 +43,7 @@ class AbstractDatabaseRecordListTest extends \TYPO3\TestingFramework\Core\Unit\U
     /**
      * @return array
      */
-    public function setTableDisplayOrderConvertsStringsDataProvider()
+    public function setTableDisplayOrderConvertsStringsDataProvider(): array
     {
         return [
             'no information at all' => [
@@ -96,7 +94,7 @@ class AbstractDatabaseRecordListTest extends \TYPO3\TestingFramework\Core\Unit\U
     /**
      * @test
      */
-    public function setTableDisplayOrderThrowsExceptionOnInvalidAfter()
+    public function setTableDisplayOrderThrowsExceptionOnInvalidAfter(): void
     {
         $iconFactoryProphecy = $this->prophesize(IconFactory::class);
         GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());
@@ -113,7 +111,7 @@ class AbstractDatabaseRecordListTest extends \TYPO3\TestingFramework\Core\Unit\U
     /**
      * @test
      */
-    public function setTableDisplayOrderThrowsExceptionOnInvalidBefore()
+    public function setTableDisplayOrderThrowsExceptionOnInvalidBefore(): void
     {
         $iconFactoryProphecy = $this->prophesize(IconFactory::class);
         GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());