From 35489701d37c33b16aeebea5816d5ef60ba683ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Uzna=C5=84ski?= <l.uznanski@macopedia.pl> Date: Sat, 17 Mar 2018 12:06:00 +0100 Subject: [PATCH] [TASK] Make AuthenticationServiceTest notice free 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> --- .../Authentication/AuthenticationServiceTest.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php b/typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php index f7a7ff148986..a634ec7b5689 100644 --- a/typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php +++ b/typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php @@ -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); -- GitLab