[TASK] Deprecate several stdWrap / cObj functions 18/58418/5
authorBenni Mack <benni@typo3.org>
Thu, 27 Sep 2018 19:24:28 +0000 (21:24 +0200)
committerJan Helke <typo3@helke.de>
Sat, 29 Sep 2018 09:13:11 +0000 (11:13 +0200)
The following legacy TypoScript options have been deprecated
- stdWrap.filelist
- stdWrap.filelink
- stdWrap.addParams

The acompanied methods are deprecated as well
- cObj->stdWrap_addParams
- cObj->stdWrap_filelink
- cObj->stdWrap_filelist
- cObj->addParams
- cObj->filelink
- cObj->filelist
- cObj->typolinkWrap
- cObj->currentPageUrl

These are not in use anymore, due to removal of CSS Styled Content.

Resolves: #86433
Releases: master
Change-Id: Ie90dce49c050092c1a359491301ad3f3dd04ee4f
Reviewed-on: https://review.typo3.org/58418
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/frontend/Tests/UnitDeprecated/ContentObject/ContentObjectRendererTest.php [new file with mode: 0644]
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst
new file mode 100644 (file)
index 0000000..6532846
--- /dev/null
@@ -0,0 +1,50 @@
+.. include:: ../../Includes.txt
+
+=========================================================================================
+Deprecation: #86433 - Various stdWrap functions and ContentObjectRenderer-related methods
+=========================================================================================
+
+See :issue:`86433`
+
+Description
+===========
+
+The following TypoScript `stdWrap` sub-properties and functionalities have been deprecated:
+
+- :ts:`stdWrap.addParams`
+- :ts:`stdWrap.filelist`
+- :ts:`stdWrap.filelink`
+
+In conjunction with the properties, the following methods have been deprecated:
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->stdWrap_addParams()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->stdWrap_filelink()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->stdWrap_filelist()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->addParams()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->filelink()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->filelist()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->typolinkWrap()`
+- :php:`TYPO3\CMS\Frontend\ContentObjectRenderer->currentPageUrl()`
+
+These functionalities have been part of TYPO3 Core due to legacy functionalities related
+to ContentObject "TABLE" and "CSS Styled Content".
+
+
+Impact
+======
+
+Calling any of the methods or using the properties will trigger a PHP deprecation notice.
+
+
+Affected Installations
+======================
+
+TYPO3 installations with custom TypoScript options which have not been migrated to FAL
+or Fluid Styled Content.
+
+
+Migration
+=========
+
+Use Fluid Styled Content, or DataProcessors instead.
+
+.. index:: Frontend, TypoScript, FullyScanned
\ No newline at end of file
index 5318b93..01dd04a 100644 (file)
@@ -118,7 +118,9 @@ class ContentObjectRenderer implements LoggerAwareInterface
         'cObject' => 'cObject',
         'cObject.' => 'array',
         'numRows.' => 'array',
+        // @deprecated - will be removed in TYPO3 v10.0.
         'filelist' => 'dir',
+        // @deprecated - will be removed in TYPO3 v10.0.
         'filelist.' => 'array',
         'preUserFunc' => 'functionName',
         'stdWrapOverride' => 'hook',
@@ -207,7 +209,9 @@ class ContentObjectRenderer implements LoggerAwareInterface
         'innerWrap.' => 'array',
         'innerWrap2' => 'wrap',
         'innerWrap2.' => 'array',
+        // @deprecated - will be removed in TYPO3 v10.0.
         'addParams.' => 'array',
+        // @deprecated - will be removed in TYPO3 v10.0.
         'filelink.' => 'array',
         'preCObject' => 'cObject',
         'preCObject.' => 'array',
@@ -1834,10 +1838,11 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * @param string $content Input value undergoing processing in this function.
      * @param array $conf stdWrap properties for filelist.
      * @return string The processed input value
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use cObject FILES instead.
      */
     public function stdWrap_filelist($content = '', $conf = [])
     {
-        return $this->filelist($conf['filelist']);
+        return $this->filelist($conf['filelist'], true);
     }
 
     /**
@@ -2566,10 +2571,11 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * @param string $content Input value undergoing processing in this function.
      * @param array $conf stdWrap properties for addParams.
      * @return string The processed input value
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0.
      */
     public function stdWrap_addParams($content = '', $conf = [])
     {
-        return $this->addParams($content, $conf['addParams.'] ?? []);
+        return $this->addParams($content, $conf['addParams.'] ?? [], true);
     }
 
     /**
@@ -2580,10 +2586,11 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * @param string $content Input value undergoing processing in this function.
      * @param array $conf stdWrap properties for filelink.
      * @return string The processed input value
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use cObject FILES instead.
      */
     public function stdWrap_filelink($content = '', $conf = [])
     {
-        return $this->filelink($content, $conf['filelink.'] ?? []);
+        return $this->filelink($content, $conf['filelink.'] ?? [], true);
     }
 
     /**
@@ -3114,12 +3121,17 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * Implements the stdWrap property "filelist"
      *
      * @param string $data The command which contains information about what files/directory listing to return. See the "filelist" property of stdWrap for details.
+     * @param bool $isCoreCall if set, the deprecation message is suppressed
      * @return string Comma list of files.
      * @access private
      * @see stdWrap()
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use cObject FILES instead.
      */
-    public function filelist($data)
+    public function filelist($data, bool $isCoreCall = false)
     {
+        if (!$isCoreCall) {
+            trigger_error('ContentObjectRenderer->filelist() will be removed in TYPO3 v10.0. Use cObject FILES instead.', E_USER_DEPRECATED);
+        }
         $data = trim($data);
         if ($data === '') {
             return '';
@@ -3513,11 +3525,16 @@ class ContentObjectRenderer implements LoggerAwareInterface
      *
      * @param string $content The string with the HTML tag.
      * @param array $conf The TypoScript configuration properties
+     * @param bool $isCoreCall if set, the deprecation message is suppressed
      * @return string The modified string
      * @todo Make it XHTML compatible. Will not present "/>" endings of tags right now. Further getting the tagname might fail if it is not separated by a normal space from the attributes.
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0.
      */
-    public function addParams($content, $conf)
+    public function addParams($content, $conf, $isCoreCall = false)
     {
+        if (!$isCoreCall) {
+            trigger_error('ContentObjectRenderer->addParams() will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
+        }
         // For XHTML compliance.
         $lowerCaseAttributes = true;
         if (!is_array($conf)) {
@@ -3559,12 +3576,17 @@ class ContentObjectRenderer implements LoggerAwareInterface
      *
      * @param string $theValue The filename to link to, possibly prefixed with $conf[path]
      * @param array $conf TypoScript parameters for the TypoScript function ->filelink
+     * @param bool $isCoreCall if set, the deprecation message is suppressed
      * @return string The link to the file possibly with icons, thumbnails, size in bytes shown etc.
      * @access private
      * @see stdWrap()
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use cObject FILES instead.
      */
-    public function filelink($theValue, $conf)
+    public function filelink($theValue, $conf, $isCoreCall = false)
     {
+        if (!$isCoreCall) {
+            trigger_error('ContentObjectRenderer->filelink() will be removed in TYPO3 v10.0. Use cObject FILES instead.', E_USER_DEPRECATED);
+        }
         $conf['path'] = isset($conf['path.'])
             ? $this->stdWrap($conf['path'] ?? '', $conf['path.'])
             : ($conf['path'] ?? '');
@@ -5596,9 +5618,11 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * @param array $conf "typolink" TypoScript properties
      * @return array An array with two values in key 0+1, each value being the start and close <a>-tag of the typolink properties being inputted in $conf
      * @see typolink()
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use typoLink() instead.
      */
     public function typolinkWrap($conf)
     {
+        trigger_error('ContentObjectRenderer->typolinkWrap() will be removed in TYPO3 v10.0. Use $cObj->typoLink() instead.', E_USER_DEPRECATED);
         $k = md5(microtime());
         return explode($k, $this->typoLink($k, $conf));
     }
@@ -5610,9 +5634,11 @@ class ContentObjectRenderer implements LoggerAwareInterface
      * @param int $id An alternative ID to the current id ($GLOBALS['TSFE']->id)
      * @return string The URL
      * @see getTypoLink_URL()
+     * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. Use getTypoLink_URL() instead.
      */
     public function currentPageUrl($urlParameters = [], $id = 0)
     {
+        trigger_error('ContentObjectRenderer->currentPageUrl() will be removed in TYPO3 v10.0. Use $cObj->getTypoLink_URL() instead.', E_USER_DEPRECATED);
         $tsfe = $this->getTypoScriptFrontendController();
         return $this->getTypoLink_URL($id ?: $tsfe->id, $urlParameters, $tsfe->sPre);
     }
index 9313d42..dc01283 100644 (file)
@@ -25,7 +25,6 @@ use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Context\UserAspect;
 use TYPO3\CMS\Core\Context\WorkspaceAspect;
 use TYPO3\CMS\Core\Core\ApplicationContext;
-use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\LinkHandling\LinkService;
 use TYPO3\CMS\Core\Log\Logger;
 use TYPO3\CMS\Core\Package\PackageManager;
@@ -3254,27 +3253,6 @@ class ContentObjectRendererTest extends UnitTestCase
         );
     }
 
-    ////////////////////////////////////
-    // Test concerning link generation
-    ////////////////////////////////////
-
-    /**
-     * @test
-     */
-    public function filelinkCreatesCorrectUrlForFileWithUrlEncodedSpecialChars(): void
-    {
-        $fileNameAndPath = Environment::getPublicPath() . '/typo3temp/var/tests/phpunitJumpUrlTestFile with spaces & amps.txt';
-        file_put_contents($fileNameAndPath, 'Some test data');
-        $relativeFileNameAndPath = substr($fileNameAndPath, strlen(Environment::getPublicPath()) + 1);
-        $fileName = substr($fileNameAndPath, strlen(Environment::getPublicPath() . '/typo3temp/var/tests/'));
-
-        $expectedLink = str_replace('%2F', '/', rawurlencode($relativeFileNameAndPath));
-        $result = $this->subject->filelink($fileName, ['path' => 'typo3temp/var/tests/']);
-        $this->assertEquals('<a href="' . $expectedLink . '">' . $fileName . '</a>', $result);
-
-        GeneralUtility::unlink_tempfile($fileNameAndPath);
-    }
-
     /**
      * Check if calculateCacheKey works properly.
      *
@@ -3909,39 +3887,6 @@ class ContentObjectRendererTest extends UnitTestCase
     }
 
     /**
-     * Check that stdWrap_addParams works properly.
-     *
-     * Show:
-     *
-     *  - Delegates to method addParams.
-     *  - Parameter 1 is $content.
-     *  - Parameter 2 is $conf['addParams.'].
-     *  - Returns the return value.
-     *
-     * @test
-     */
-    public function stdWrap_addParams(): void
-    {
-        $content = $this->getUniqueId('content');
-        $conf = [
-            'addParams' => $this->getUniqueId('not used'),
-            'addParams.' => [$this->getUniqueId('addParams.')],
-        ];
-        $return = $this->getUniqueId('return');
-        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
-            ->setMethods(['addParams'])->getMock();
-        $subject
-            ->expects($this->once())
-            ->method('addParams')
-            ->with($content, $conf['addParams.'])
-            ->willReturn($return);
-        $this->assertSame(
-            $return,
-            $subject->stdWrap_addParams($content, $conf)
-        );
-    }
-
-    /**
      * Check if stdWrap_age works properly.
      *
      * Show:
@@ -5636,62 +5581,6 @@ class ContentObjectRendererTest extends UnitTestCase
     }
 
     /**
-     * Check if stdWrap_filelink works properly.
-     *
-     * Show:
-     *
-     * - Delegates to method filelink.
-     * - Parameter 1 is $content.
-     * - Parameter 2 is $conf['filelink.'].
-     * - Returns the return value.
-     *
-     * @test
-     */
-    public function stdWrap_filelink(): void
-    {
-        $content = $this->getUniqueId('content');
-        $conf = [
-            'filelink' => $this->getUniqueId('not used'),
-            'filelink.' => [$this->getUniqueId('filelink.')],
-        ];
-        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
-            ->setMethods(['filelink'])->getMock();
-        $subject->expects($this->once())->method('filelink')
-            ->with($content, $conf['filelink.'])->willReturn('return');
-        $this->assertSame(
-            'return',
-            $subject->stdWrap_filelink($content, $conf)
-        );
-    }
-
-    /**
-     * Check if stdWrap_filelist works properly.
-     *
-     * Show:
-     *
-     * - Delegates to method filelist.
-     * - Parameter is $conf['filelist'].
-     * - Returns the return value.
-     *
-     * @test
-     */
-    public function stdWrap_filelist(): void
-    {
-        $conf = [
-            'filelist' => $this->getUniqueId('filelist'),
-            'filelist.' => [$this->getUniqueId('not used')],
-        ];
-        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
-            ->setMethods(['filelist'])->getMock();
-        $subject->expects($this->once())->method('filelist')
-            ->with($conf['filelist'])->willReturn('return');
-        $this->assertSame(
-            'return',
-            $subject->stdWrap_filelist('discard', $conf)
-        );
-    }
-
-    /**
      * Data provider for the hash test
      *
      * @return array [$expect, $content, $conf]
diff --git a/typo3/sysext/frontend/Tests/UnitDeprecated/ContentObject/ContentObjectRendererTest.php b/typo3/sysext/frontend/Tests/UnitDeprecated/ContentObject/ContentObjectRendererTest.php
new file mode 100644 (file)
index 0000000..5e76244
--- /dev/null
@@ -0,0 +1,254 @@
+<?php
+declare(strict_types = 1);
+namespace TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Context\Context;
+use TYPO3\CMS\Core\Core\Environment;
+use TYPO3\CMS\Core\Log\Logger;
+use TYPO3\CMS\Core\Package\PackageManager;
+use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\ContentObject\CaseContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ContentContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject;
+use TYPO3\CMS\Frontend\ContentObject\FileContentObject;
+use TYPO3\CMS\Frontend\ContentObject\FilesContentObject;
+use TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject;
+use TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ImageContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject;
+use TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject;
+use TYPO3\CMS\Frontend\ContentObject\RecordsContentObject;
+use TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject;
+use TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject;
+use TYPO3\CMS\Frontend\ContentObject\TemplateContentObject;
+use TYPO3\CMS\Frontend\ContentObject\TextContentObject;
+use TYPO3\CMS\Frontend\ContentObject\UserContentObject;
+use TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Frontend\Page\PageRepository;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ */
+class ContentObjectRendererTest extends UnitTestCase
+{
+    /**
+     * @var bool Reset singletons created by subject
+     */
+    protected $resetSingletonInstances = true;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|ContentObjectRenderer
+     */
+    protected $subject;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|TypoScriptFrontendController
+     */
+    protected $frontendControllerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|TemplateService
+     */
+    protected $templateServiceMock;
+
+    /**
+     * Default content object name -> class name map, shipped with TYPO3 CMS
+     *
+     * @var array
+     */
+    protected $contentObjectMap = [
+        'TEXT' => TextContentObject::class,
+        'CASE' => CaseContentObject::class,
+        'COBJ_ARRAY' => ContentObjectArrayContentObject::class,
+        'COA' => ContentObjectArrayContentObject::class,
+        'COA_INT' => ContentObjectArrayInternalContentObject::class,
+        'USER' => UserContentObject::class,
+        'USER_INT' => UserInternalContentObject::class,
+        'FILE' => FileContentObject::class,
+        'FILES' => FilesContentObject::class,
+        'IMAGE' => ImageContentObject::class,
+        'IMG_RESOURCE' => ImageResourceContentObject::class,
+        'CONTENT' => ContentContentObject::class,
+        'RECORDS' => RecordsContentObject::class,
+        'HMENU' => HierarchicalMenuContentObject::class,
+        'CASEFUNC' => CaseContentObject::class,
+        'LOAD_REGISTER' => LoadRegisterContentObject::class,
+        'RESTORE_REGISTER' => RestoreRegisterContentObject::class,
+        'TEMPLATE' => TemplateContentObject::class,
+        'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
+        'SVG' => ScalableVectorGraphicsContentObject::class,
+        'EDITPANEL' => EditPanelContentObject::class
+    ];
+
+    /**
+     * Set up
+     */
+    protected function setUp(): void
+    {
+        $GLOBALS['SIM_ACCESS_TIME'] = 1534278180;
+        $packageManagerMock = $this->getMockBuilder(PackageManager::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->templateServiceMock =
+            $this->getMockBuilder(TemplateService::class)
+                ->setConstructorArgs([null, $packageManagerMock])
+                ->setMethods(['linkData'])
+                ->getMock();
+        $pageRepositoryMock =
+            $this->getAccessibleMock(PageRepository::class, ['getRawRecord', 'getMountPointInfo']);
+        $this->frontendControllerMock =
+            $this->getAccessibleMock(
+                TypoScriptFrontendController::class,
+                ['sL'],
+                [],
+                '',
+                false
+            );
+        $this->frontendControllerMock->_set('context', GeneralUtility::makeInstance(Context::class));
+        $this->frontendControllerMock->tmpl = $this->templateServiceMock;
+        $this->frontendControllerMock->config = [];
+        $this->frontendControllerMock->page = [];
+        $this->frontendControllerMock->sys_page = $pageRepositoryMock;
+        $GLOBALS['TSFE'] = $this->frontendControllerMock;
+
+        $this->subject = $this->getAccessibleMock(
+            ContentObjectRenderer::class,
+            ['getResourceFactory', 'getEnvironmentVariable'],
+            [$this->frontendControllerMock]
+        );
+
+        $logger = $this->prophesize(Logger::class);
+        $this->subject->setLogger($logger->reveal());
+        $this->subject->setContentObjectClassMap($this->contentObjectMap);
+        $this->subject->start([], 'tt_content');
+    }
+
+    ////////////////////////////////////
+    // Test concerning link generation
+    ////////////////////////////////////
+
+    /**
+     * @test
+     */
+    public function filelinkCreatesCorrectUrlForFileWithUrlEncodedSpecialChars(): void
+    {
+        $fileNameAndPath = Environment::getPublicPath() . '/typo3temp/var/tests/phpunitJumpUrlTestFile with spaces & amps.txt';
+        file_put_contents($fileNameAndPath, 'Some test data');
+        $relativeFileNameAndPath = substr($fileNameAndPath, strlen(Environment::getPublicPath()) + 1);
+        $fileName = substr($fileNameAndPath, strlen(Environment::getPublicPath() . '/typo3temp/var/tests/'));
+
+        $expectedLink = str_replace('%2F', '/', rawurlencode($relativeFileNameAndPath));
+        $result = $this->subject->filelink($fileName, ['path' => 'typo3temp/var/tests/'], true);
+        $this->assertEquals('<a href="' . $expectedLink . '">' . $fileName . '</a>', $result);
+
+        GeneralUtility::unlink_tempfile($fileNameAndPath);
+    }
+
+    /**
+     * Check that stdWrap_addParams works properly.
+     *
+     * Show:
+     *
+     *  - Delegates to method addParams.
+     *  - Parameter 1 is $content.
+     *  - Parameter 2 is $conf['addParams.'].
+     *  - Returns the return value.
+     *
+     * @test
+     */
+    public function stdWrap_addParams(): void
+    {
+        $content = $this->getUniqueId('content');
+        $conf = [
+            'addParams' => $this->getUniqueId('not used'),
+            'addParams.' => [$this->getUniqueId('addParams.')],
+        ];
+        $return = $this->getUniqueId('return');
+        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
+            ->setMethods(['addParams'])->getMock();
+        $subject
+            ->expects($this->once())
+            ->method('addParams')
+            ->with($content, $conf['addParams.'])
+            ->willReturn($return);
+        $this->assertSame(
+            $return,
+            $subject->stdWrap_addParams($content, $conf)
+        );
+    }
+
+    /**
+     * Check if stdWrap_filelink works properly.
+     *
+     * Show:
+     *
+     * - Delegates to method filelink.
+     * - Parameter 1 is $content.
+     * - Parameter 2 is $conf['filelink.'].
+     * - Returns the return value.
+     *
+     * @test
+     */
+    public function stdWrap_filelink(): void
+    {
+        $content = $this->getUniqueId('content');
+        $conf = [
+            'filelink' => $this->getUniqueId('not used'),
+            'filelink.' => [$this->getUniqueId('filelink.')],
+        ];
+        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
+            ->setMethods(['filelink'])->getMock();
+        $subject->expects($this->once())->method('filelink')
+            ->with($content, $conf['filelink.'])->willReturn('return');
+        $this->assertSame(
+            'return',
+            $subject->stdWrap_filelink($content, $conf)
+        );
+    }
+
+    /**
+     * Check if stdWrap_filelist works properly.
+     *
+     * Show:
+     *
+     * - Delegates to method filelist.
+     * - Parameter is $conf['filelist'].
+     * - Returns the return value.
+     *
+     * @test
+     */
+    public function stdWrap_filelist(): void
+    {
+        $conf = [
+            'filelist' => $this->getUniqueId('filelist'),
+            'filelist.' => [$this->getUniqueId('not used')],
+        ];
+        $subject = $this->getMockBuilder(ContentObjectRenderer::class)
+            ->setMethods(['filelist'])->getMock();
+        $subject->expects($this->once())->method('filelist')
+            ->with($conf['filelist'])->willReturn('return');
+        $this->assertSame(
+            'return',
+            $subject->stdWrap_filelist('discard', $conf)
+        );
+    }
+}
index 2325979..2a9bb96 100644 (file)
@@ -3579,4 +3579,60 @@ return [
             'Deprecation-86411-TSFE-makeCacheHash.rst'
         ],
     ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_addParams' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_filelink' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_filelist' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->addParams' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->filelink' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->filelist' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->typolinkWrap' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
+    'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->currentPageUrl' => [
+        'numberOfMandatoryArguments' => 0,
+        'maximumNumberOfArguments' => 0,
+        'restFiles' => [
+            'Deprecation-86433-VariousStdWrapFunctionsAndContentObjectRenderer-relatedMethods.rst'
+        ],
+    ],
 ];