[TASK] Make FileLinkHandlerTest notice free 33/56233/2
authorSascha Löffler <lsascha@gmail.com>
Fri, 16 Mar 2018 15:06:04 +0000 (16:06 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Mar 2018 15:18:15 +0000 (16:18 +0100)
Resolves: #84351
Releases: master
Change-Id: I9300d5668ac17b850bff94fb756cdc4961cc404d
Reviewed-on: https://review.typo3.org/56233
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Unit/LinkHandling/FileLinkHandlerTest.php

index ad43e5d..5147d28 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types = 1);
 namespace TYPO3\CMS\Core\Tests\Unit\LinkHandling;
 
 /*
@@ -19,15 +20,11 @@ use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Resource\ResourceStorage;
 use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
-class FileLinkHandlerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
+class FileLinkHandlerTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * testing folders
      */
 
@@ -85,7 +82,7 @@ class FileLinkHandlerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
             ->getMock();
 
         // fake methods to return proper objects
-        $fileObject = new File(['identifier' => $expected['file']], $storage);
+        $fileObject = new File(['identifier' => $expected['file'], 'name' => 'foobar.txt'], $storage);
         $factory->expects($this->any())->method('getFileObject')->with($expected['file'])->willReturn($fileObject);
         $expected['file'] = $fileObject;