Skip to content

Commit

Permalink
[TASK] Make MimeTypeValidatorTest notice free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Łukasz Uznański authored and wouter90 committed Mar 17, 2018
1 parent f4184f5 commit a53df9c
Showing 1 changed file with 8 additions and 11 deletions.
@@ -1,4 +1,5 @@
<?php
declare(strict_types = 1);
namespace TYPO3\CMS\Form\Tests\Unit\Mvc\Validation;

/*
Expand All @@ -18,21 +19,17 @@
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);
Expand All @@ -49,7 +46,7 @@ public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsString
/**
* @test
*/
public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsEmptyArray()
public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsEmptyArray(): void
{
$this->expectException(InvalidValidationOptionsException::class);
$this->expectExceptionCode(1471713296);
Expand All @@ -66,7 +63,7 @@ public function MimeTypeValidatorThrowsExceptionIfAllowedMimeTypesOptionIsEmptyA
/**
* @test
*/
public function MimeTypeValidatorReturnsTrueIfFileResourceIsNotAllowedMimeType()
public function MimeTypeValidatorReturnsTrueIfFileResourceIsNotAllowedMimeType(): void
{
$options = ['allowedMimeTypes' => ['image/jpeg']];
$validator = $this->getMockBuilder(MimeTypeValidator::class)
Expand All @@ -85,7 +82,7 @@ public function MimeTypeValidatorReturnsTrueIfFileResourceIsNotAllowedMimeType()
/**
* @test
*/
public function MimeTypeValidatorReturnsFalseIfInputIsEmptyString()
public function MimeTypeValidatorReturnsFalseIfInputIsEmptyString(): void
{
$options = ['allowedMimeTypes' => ['fake']];
$validator = $this->getMockBuilder(MimeTypeValidator::class)
Expand All @@ -99,7 +96,7 @@ public function MimeTypeValidatorReturnsFalseIfInputIsEmptyString()
/**
* @test
*/
public function MimeTypeValidatorReturnsTrueIfInputIsNoFileResource()
public function MimeTypeValidatorReturnsTrueIfInputIsNoFileResource(): void
{
$options = ['allowedMimeTypes' => ['fake']];
$validator = $this->getMockBuilder(MimeTypeValidator::class)
Expand Down

0 comments on commit a53df9c

Please sign in to comment.