Skip to content

Commit

Permalink
[TASK] Make LegacyLinkNotationConverterTest notice free
Browse files Browse the repository at this point in the history
Resolves: #84418
Releases: master
Change-Id: I63db56d7ea5e5ac40aaa887182149df70ddf43d9
Reviewed-on: https://review.typo3.org/56289
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>
  • Loading branch information
Łukasz Uznański authored and lolli42 committed Mar 17, 2018
1 parent 3548970 commit 1562fed
Showing 1 changed file with 9 additions and 12 deletions.
@@ -1,4 +1,5 @@
<?php
declare(strict_types = 1);
namespace TYPO3\CMS\Core\Tests\Unit\LinkHandling;

/*
Expand All @@ -21,20 +22,16 @@
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 LegacyLinkNotationConverterTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
class LegacyLinkNotationConverterTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;

/**
* Data to resolve strings to arrays and vice versa, external, mail, page
*
* @return array
*/
public function resolveParametersForNonFilesDataProvider()
public function resolveParametersForNonFilesDataProvider(): array
{
return [
'simple page - old style' => [
Expand Down Expand Up @@ -98,7 +95,7 @@ public function resolveParametersForNonFilesDataProvider()
*
* @dataProvider resolveParametersForNonFilesDataProvider
*/
public function resolveReturnsSplitParameters($input, $expected, $finalString)
public function resolveReturnsSplitParameters($input, $expected, $finalString): void
{
$subject = new LegacyLinkNotationConverter();
$this->assertEquals($expected, $subject->resolve($input));
Expand All @@ -113,7 +110,7 @@ public function resolveReturnsSplitParameters($input, $expected, $finalString)
*
* @dataProvider resolveParametersForNonFilesDataProvider
*/
public function splitParametersToUnifiedIdentifier($input, $parameters, $expected)
public function splitParametersToUnifiedIdentifier($input, $parameters, $expected): void
{
$subject = new LinkService();
$this->assertEquals($expected, $subject->asString($parameters));
Expand All @@ -132,7 +129,7 @@ public function splitParametersToUnifiedIdentifier($input, $parameters, $expecte
*
* @return array
*/
public function resolveParametersForFilesDataProvider()
public function resolveParametersForFilesDataProvider(): array
{
return [
'file without FAL - VERY old style' => [
Expand Down Expand Up @@ -189,7 +186,7 @@ public function resolveParametersForFilesDataProvider()
*
* @dataProvider resolveParametersForFilesDataProvider
*/
public function resolveFileReferencesToSplitParameters($input, $expected, $finalString)
public function resolveFileReferencesToSplitParameters($input, $expected, $finalString): void
{
$storage = $this->getMockBuilder(ResourceStorage::class)
->disableOriginalConstructor()
Expand Down Expand Up @@ -239,7 +236,7 @@ public function resolveFileReferencesToSplitParameters($input, $expected, $final
*
* @dataProvider resolveParametersForFilesDataProvider
*/
public function splitParametersToUnifiedIdentifierForFiles($input, $parameters, $expected)
public function splitParametersToUnifiedIdentifierForFiles($input, $parameters, $expected): void
{
// fake methods to return proper objects
if ($parameters['type'] === LinkService::TYPE_FILE) {
Expand Down

0 comments on commit 1562fed

Please sign in to comment.