‪TYPO3CMS  11.5
TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest:

Public Member Functions

array _parseFuncReturnsCorrectHtmlDataProvider ()
 
 stdWrap_parseFuncReturnsParsedHtml ($value, $configuration, $expectedResult)
 
array _parseFuncParsesNestedTagsProperlyDataProvider ()
 
 parseFuncParsesNestedTagsProperly (string $value, array $configuration, string $expectedResult)
 
array stdWrap_editIconsDataProvider ()
 
 stdWrap_editIcons (string $expect, string $content, array $conf, bool $login, int $times, array $param3, string $will)
 
array stdWrap_editPanelDataProvider ()
 
 stdWrap_editPanel (string $expect, string $content, bool $login, int $times, string $will)
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
 $backupEnvironment = true
 

Private Attributes

PHPUnit Framework MockObject MockObject AccessibleObjectInterface ContentObjectRenderer $subject
 
PHPUnit Framework MockObject MockObject TypoScriptFrontendController AccessibleObjectInterface $frontendControllerMock
 
PHPUnit Framework MockObject MockObject TemplateService $templateServiceMock
 
array $contentObjectMap
 
ObjectProphecy $cacheManager
 

Detailed Description

Test case

Definition at line 60 of file ContentObjectRendererTest.php.

Member Function Documentation

◆ _parseFuncParsesNestedTagsProperlyDataProvider()

array TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::_parseFuncParsesNestedTagsProperlyDataProvider ( )

Data provider for the parseFuncParsesNestedTagsProperly test

Returns
‪array multi-dimensional array with test data
See also
parseFuncParsesNestedTagsProperly

Definition at line 239 of file ContentObjectRendererTest.php.

◆ _parseFuncReturnsCorrectHtmlDataProvider()

array TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::_parseFuncReturnsCorrectHtmlDataProvider ( )
Returns
‪array

Definition at line 180 of file ContentObjectRendererTest.php.

◆ parseFuncParsesNestedTagsProperly()

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::parseFuncParsesNestedTagsProperly ( string  $value,
array  $configuration,
string  $expectedResult 
)
Test:
‪@dataProvider _parseFuncParsesNestedTagsProperlyDataProvider
Parameters
string$value
array$configuration
string$expectedResult

Definition at line 501 of file ContentObjectRendererTest.php.

◆ setUp()

◆ stdWrap_editIcons()

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::stdWrap_editIcons ( string  $expect,
string  $content,
array  $conf,
bool  $login,
int  $times,
array  $param3,
string  $will 
)

Check if stdWrap_editIcons works properly.

Show:

  • ‪Returns $content as is if:
    • ‪beUserLogin is not set
    • ‪(bool)$conf['editIcons'] is false
  • Otherwise:

    • ‪Delegates to method editIcons.
    • ‪Parameter 1 is $content.
    • ‪Parameter 2 is $conf['editIcons'].
    • ‪Parameter 3 is $conf['editIcons.'].
    • ‪If $conf['editIcons.'] is no array at all, the empty array is used.
    • ‪Returns the return value.
    Test:
    ‪@dataProvider stdWrap_editIconsDataProvider
    Parameters
    string$expect‪The expected output.
    string$content‪The given content.
    array$conf‪The given configuration.
    bool$login‪Simulate backend user login.
    int$times‪Times editIcons is called (0 or 1).
    array$param3‪The expected third parameter.
    string$will‪Return value of editIcons.

Definition at line 601 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest\$subject.

◆ stdWrap_editIconsDataProvider()

array TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::stdWrap_editIconsDataProvider ( )

Data provider for stdWrap_editIcons.

Returns
‪array

Definition at line 511 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ stdWrap_editPanel()

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::stdWrap_editPanel ( string  $expect,
string  $content,
bool  $login,
int  $times,
string  $will 
)

Check if stdWrap_editPanel works properly.

Show:

  • ‪Returns $content as is if:
    • ‪beUserLogin is not set
  • Otherwise:

    • ‪Delegates to method editPanel.
    • ‪Parameter 1 is $content.
    • ‪Parameter 2 is $conf['editPanel'].
    • ‪Returns the return value.
    Test:
    ‪@dataProvider stdWrap_editPanelDataProvider
    Parameters
    string$expect‪The expected output.
    string$content‪The given content.
    bool$login‪Simulate backend user login.
    int$times‪Times editPanel is called (0 or 1).
    string$will‪Return value of editPanel.

Definition at line 678 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ stdWrap_editPanelDataProvider()

array TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::stdWrap_editPanelDataProvider ( )

Data provider for stdWrap_editPanel.

Returns
‪array [$expect, $content, $login, $times, $will]

Definition at line 635 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ stdWrap_parseFuncReturnsParsedHtml()

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::stdWrap_parseFuncReturnsParsedHtml (   $value,
  $configuration,
  $expectedResult 
)
Test:
‪@dataProvider _parseFuncReturnsCorrectHtmlDataProvider
Parameters
string$value
array$configuration
string$expectedResult

Definition at line 228 of file ContentObjectRendererTest.php.

◆ tearDown()

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::tearDown ( )
protected

Definition at line 171 of file ContentObjectRendererTest.php.

References $GLOBALS.

Member Data Documentation

◆ $backupEnvironment

TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$backupEnvironment = true
protected

Definition at line 109 of file ContentObjectRendererTest.php.

◆ $cacheManager

ObjectProphecy TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$cacheManager
private

Definition at line 107 of file ContentObjectRendererTest.php.

◆ $contentObjectMap

array TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$contentObjectMap
private
Initial value:
= array(
'TEXT' => TextContentObject::class,
'CASE' => CaseContentObject::class,
'COBJ_ARRAY' => ContentObjectArrayContentObject::class,
'COA' => ContentObjectArrayContentObject::class,
'COA_INT' => ContentObjectArrayInternalContentObject::class,
'USER' => UserContentObject::class,
'USER_INT' => UserInternalContentObject::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,
'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
'SVG' => ScalableVectorGraphicsContentObject::class,
'EDITPANEL' => EditPanelContentObject::class,
)

Default content object name -> class name map, shipped with TYPO3 CMS

Definition at line 84 of file ContentObjectRendererTest.php.

◆ $frontendControllerMock

PHPUnit Framework MockObject MockObject TypoScriptFrontendController AccessibleObjectInterface TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$frontendControllerMock
private

◆ $resetSingletonInstances

bool TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$resetSingletonInstances = true
protected

Reset singletons created by subject

Definition at line 66 of file ContentObjectRendererTest.php.

◆ $subject

PHPUnit Framework MockObject MockObject AccessibleObjectInterface ContentObjectRenderer TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$subject
private

◆ $templateServiceMock

PHPUnit Framework MockObject MockObject TemplateService TYPO3\CMS\Frontend\Tests\UnitDeprecated\ContentObject\ContentObjectRendererTest::$templateServiceMock
private