From a53df9cb0997af69982a1262a27a8fe4ace620c0 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 11:53:03 +0100
Subject: [PATCH] [TASK] Make MimeTypeValidatorTest notice free

Resolves: #84415
Releases: master
Change-Id: Iacc499edbdb3cbda28b5f2b5b628b2af2ed07048
Reviewed-on: https://review.typo3.org/56287
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
---
 .../Mvc/Validation/MimeTypeValidatorTest.php  | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/typo3/sysext/form/Tests/Unit/Mvc/Validation/MimeTypeValidatorTest.php b/typo3/sysext/form/Tests/Unit/Mvc/Validation/MimeTypeValidatorTest.php
index 6ee00629715e..f8dbaa19eff4 100644
--- a/typo3/sysext/form/Tests/Unit/Mvc/Validation/MimeTypeValidatorTest.php
+++ b/typo3/sysext/form/Tests/Unit/Mvc/Validation/MimeTypeValidatorTest.php
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Form\Tests\Unit\Mvc\Validation;
 
 /*
@@ -18,21 +19,17 @@ use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\ResourceStorage;
 use TYPO3\CMS\Form\Mvc\Validation\Exception\InvalidValidationOptionsException;
 use TYPO3\CMS\Form\Mvc\Validation\MimeTypeValidator;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
  * Test case
  */
-class MimeTypeValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class MimeTypeValidatorTest extends UnitTestCase
 {
-    /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
     /**
      * @test
      */
-    public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsString()
+    public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsString(): void
     {
         $this->expectException(InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1471713296);
@@ -49,7 +46,7 @@ class MimeTypeValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
     /**
      * @test
      */
-    public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsEmptyArray()
+    public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsEmptyArray(): void
     {
         $this->expectException(InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1471713296);
@@ -66,7 +63,7 @@ class MimeTypeValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
     /**
      * @test
      */
-    public function MimeTypeValidatorReturnsTrueIfFileResourceIsNotAllowedMimeType()
+    public function MimeTypeValidatorReturnsTrueIfFileResourceIsNotAllowedMimeType(): void
     {
         $options = ['allowedMimeTypes' => ['image/jpeg']];
         $validator = $this->getMockBuilder(MimeTypeValidator::class)
@@ -85,7 +82,7 @@ class MimeTypeValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
     /**
      * @test
      */
-    public function MimeTypeValidatorReturnsFalseIfInputIsEmptyString()
+    public function MimeTypeValidatorReturnsFalseIfInputIsEmptyString(): void
     {
         $options = ['allowedMimeTypes' => ['fake']];
         $validator = $this->getMockBuilder(MimeTypeValidator::class)
@@ -99,7 +96,7 @@ class MimeTypeValidatorTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
     /**
      * @test
      */
-    public function MimeTypeValidatorReturnsTrueIfInputIsNoFileResource()
+    public function MimeTypeValidatorReturnsTrueIfInputIsNoFileResource(): void
     {
         $options = ['allowedMimeTypes' => ['fake']];
         $validator = $this->getMockBuilder(MimeTypeValidator::class)
-- 
GitLab