[TASK] Make AuthenticationServiceTest notice free 88/56288/2
authorŁukasz Uznański <l.uznanski@macopedia.pl>
Sat, 17 Mar 2018 11:06:00 +0000 (12:06 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 17 Mar 2018 12:23:00 +0000 (13:23 +0100)
Resolves: #84417
Releases: master
Change-Id: I9fb38a0a7dbb1bd0241c7804fbfb97ef23e8aa7a
Reviewed-on: https://review.typo3.org/56288
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>
typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php

index f7a7ff1..a634ec7 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Core\Tests\Unit\Authentication;
 
 /*
@@ -14,23 +15,20 @@ namespace TYPO3\CMS\Core\Tests\Unit\Authentication;
  * The TYPO3 project - inspiring people to share!
  */
 use TYPO3\CMS\Core\Authentication\AuthenticationService;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Testcase for class \TYPO3\CMS\Core\Authentication\AuthenticationService
  */
-class AuthenticationServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class AuthenticationServiceTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * Date provider for processLoginReturnsCorrectData
      *
      * @return array
      */
-    public function processLoginDataProvider()
+    public function processLoginDataProvider(): array
     {
         return [
             'Backend login with securityLevel "normal"' => [
@@ -68,10 +66,10 @@ class AuthenticationServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      * @test
      * @dataProvider processLoginDataProvider
      */
-    public function processLoginReturnsCorrectData($passwordSubmissionStrategy, $loginData, $expectedProcessedData)
+    public function processLoginReturnsCorrectData($passwordSubmissionStrategy, $loginData, $expectedProcessedData): void
     {
         /** @var $authenticationService AuthenticationService */
-        $authenticationService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(AuthenticationService::class);
+        $authenticationService = GeneralUtility::makeInstance(AuthenticationService::class);
         // Login data is modified by reference
         $authenticationService->processLoginData($loginData, $passwordSubmissionStrategy);
         $this->assertEquals($expectedProcessedData, $loginData);