‪TYPO3CMS  10.4
TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest:
TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTestTrait

Public Member Functions

 getImgResourceCallsGetImgResourcePostProcessHook ()
 
array isGetImgResourceHookCalledCallback (string $file, array $fileArray, $imageResource, ContentObjectRenderer $parent)
 
 canRegisterAContentObjectClassForATypoScriptName ()
 
 canSetTheContentObjectClassMapAndGetARegisteredContentObject ()
 
 canNotAccessInternalContentObjectMapByReference ()
 
 willReturnNullForUnregisteredObject ()
 
 willThrowAnExceptionForARegisteredNonContentObject ()
 
string[][] registersAllDefaultContentObjectsDataProvider ()
 
 registersAllDefaultContentObjects (string $objectName, string $className)
 
 getQueryArgumentsExcludesParameters ()
 
 getQueryArgumentsExcludesGetParameters ()
 
 getQueryArgumentsOverrulesSingleParameter ()
 
 getQueryArgumentsOverrulesMultiDimensionalParameters ()
 
 getQueryArgumentsOverrulesMultiDimensionalForcedParameters ()
 
array getQueryArgumentsHandlesRemovedMethodsDataProvider ()
 
 getQueryArgumentsHandlesRemovedMethods (string $method, string $expectedMessage, string $expectedResult)
 
 cropIsMultibyteSafe ()
 
array cropHTMLDataProvider ()
 
 cropHTML (string $expect, string $content, string $conf)
 
array roundDataProvider ()
 
 round (float $expect, $content, array $conf)
 
 recursiveStdWrapProperlyRendersBasicString ()
 
 recursiveStdWrapIsOnlyCalledOnce ()
 
array numberFormatDataProvider ()
 
 numberFormat (string $expects, $content, array $conf)
 
array replacementDataProvider ()
 
 replacement (string $expects, string $content, array $conf)
 
array calcAgeDataProvider ()
 
 calcAge (string $expect, int $timestamp, string $labels)
 
array stdWrapReturnsExpectationDataProvider ()
 
 stdWrapReturnsExpectation (string $content, array $configuration, string $expectation)
 
array substringDataProvider ()
 
 substring (string $expect, string $content, string $conf)
 
array getDataWithTypeGpDataProvider ()
 
 getDataWithTypeGp (string $key, string $expectedValue)
 
 getDataWithTypeTsfe ()
 
 getDataWithTypeGetenv ()
 
 getDataWithTypeGetindpenv ()
 
 getDataWithTypeField ()
 
 getDataWithTypeFieldAndFieldIsMultiDimensional ()
 
 getDataWithTypeFileReturnsUidOfFileObjectDataProvider ()
 
 getDataWithTypeFileReturnsUidOfFileObject (string $typoScriptPath)
 
 getDataWithTypeParameters ()
 
 getDataWithTypeRegister ()
 
 getDataWithTypeSession ()
 
 getDataWithTypeLevel ()
 
 getDataWithTypeGlobal ()
 
 getDataWithTypeLeveltitle ()
 
 getDataWithTypeLevelmedia ()
 
 getDataWithTypeLeveluid ()
 
 getDataWithTypeLevelfield ()
 
 getDataWithTypeFullrootline ()
 
 getDataWithTypeDate ()
 
 getDataWithTypePage ()
 
 getDataWithTypeCurrent ()
 
 getDataWithTypeDb ()
 
 getDataWithTypeLll ()
 
 getDataWithTypePath ()
 
 getDataWithTypeContext ()
 
 getDataWithTypeSite ()
 
 getDataWithTypeSiteWithBaseVariants ()
 
 getDataWithTypeSiteLanguage ()
 
 getDataWithTypeParentRecordNumber ()
 
 getDataWithTypeDebugRootline ()
 
 getDataWithTypeDebugFullRootline ()
 
 getDataWithTypeDebugData ()
 
 getDataWithTypeDebugRegister ()
 
 getDataWithTypeDebugPage ()
 
 aTagParamsHasLeadingSpaceIfNotEmpty ()
 
 aTagParamsHaveSpaceBetweenLocalAndGlobalParams ()
 
 aTagParamsHasNoLeadingSpaceIfEmpty ()
 
 renderingContentObjectThrowsException ()
 
 exceptionHandlerIsEnabledByDefaultInProductionContext ()
 
 renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredLocally ()
 
 renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredGlobally ()
 
 globalExceptionHandlerConfigurationCanBeOverriddenByLocalConfiguration ()
 
 renderedErrorMessageCanBeCustomized ()
 
 localConfigurationOverridesGlobalConfiguration ()
 
 specificExceptionsCanBeIgnoredByExceptionHandler ()
 
array typolinkReturnsCorrectLinksForEmailsAndUrlsDataProvider ()
 
 typolinkReturnsCorrectLinksForEmailsAndUrls ($linkText, $configuration, $expectedResult)
 
 typoLinkEncodesMailAddressForSpamProtection (array $settings, $linkText, $mailAddress, $expected)
 
array typoLinkEncodesMailAddressForSpamProtectionDataProvider ()
 
array typolinkReturnsCorrectLinksFilesDataProvider ()
 
 typolinkReturnsCorrectLinksFiles ($linkText, $configuration, $expectedResult)
 
array typolinkReturnsCorrectLinksForFilesWithAbsRefPrefixDataProvider ()
 
 typolinkReturnsCorrectLinksForFilesWithAbsRefPrefix ( $linkText, $configuration, $absRefPrefix, $expectedResult)
 
 typolinkOpensInNewWindow ()
 
 typoLinkReturnsOnlyLinkTextIfNoLinkResolvingIsPossible ()
 
 typoLinkLogsErrorIfNoLinkResolvingIsPossible ()
 
 stdWrap_splitObjReturnsCount ()
 
array calculateCacheKeyDataProvider ()
 
 calculateCacheKey (string $expect, array $conf, int $times, $with, $withWrap, $will)
 
array getFromCacheDtataProvider ()
 
 getFromCache ($expect, $conf, $cacheKey, $times, $cached)
 
array getFieldValDataProvider ()
 
 getFieldVal ($expect, string $fields)
 
array caseshiftDataProvider ()
 
 caseshift (string $expect, string $content, string $case)
 
array HTMLcaseshiftDataProvider ()
 
 HTMLcaseshift (string $expect, string $content, string $case, array $with, array $will)
 
 allStdWrapProcessorsAreCallable ()
 
 notAllStdWrapProcessorsAreCallableWithEmptyConfiguration ()
 
array fourTypesOfStdWrapHookObjectProcessorsDataProvider ()
 
 fourTypesOfStdWrapHookObjectProcessors (string $stdWrapMethod, string $hookObjectCall)
 
array stdWrap_HTMLparserDataProvider ()
 
 stdWrap_HTMLparser (string $expect, string $content, array $conf, int $times, string $will)
 
array stdWrap_addPageCacheTagsAddsPageTagsDataProvider ()
 
 stdWrap_addPageCacheTagsAddsPageTags (array $expectedTags, array $configuration)
 
 stdWrap_age ()
 
 stdWrap_append ()
 
string[][] stdWrapBrDataProvider ()
 
 stdWrap_br ($expected, $input, $xhtmlDoctype)
 
array stdWrapBrTagDataProvider ()
 
 stdWrap_brTag (string $input, string $expected, array $config)
 
array stdWrap_bytesDataProvider ()
 
 stdWrap_bytes (string $expect, string $content, array $conf)
 
 stdWrap_cObject ()
 
array stdWrap_orderedStdWrapDataProvider ()
 
 stdWrap_orderedStdWrap ($firstConf, array $secondConf, array $conf)
 
array stdWrap_cacheReadDataProvider ()
 
 stdWrap_cacheRead (string $expect, string $input, array $conf, int $times, $with, $will)
 
array stdWrap_cacheStoreDataProvider ()
 
 stdWrap_cacheStore ( $confCache, int $timesCCK, $key, int $times)
 
 stdWrap_case ()
 
 stdWrap_char ()
 
 stdWrap_crop ()
 
 stdWrap_cropHTML ()
 
array stdWrap_csConvDataProvider ()
 
 stdWrap_csConv (string $expected, string $input, array $conf)
 
 stdWrap_current ()
 
array stdWrap_dataDataProvider ()
 
 stdWrap_data (array $expect, array $data, $alt)
 
 stdWrap_dataWrap ()
 
array stdWrap_dateDataProvider ()
 
 stdWrap_date (string $expected, $content, array $conf, int $now)
 
 stdWrap_debug ()
 
 stdWrap_debugData ()
 
array stdWrap_debugFuncDataProvider ()
 
 stdWrap_debugFunc (bool $expectArray, $confDebugFunc)
 
array stdWrapDoubleBrTagDataProvider ()
 
 stdWrap_doubleBrTag (string $expected, string $input, array $config)
 
array stdWrap_editIconsDataProvider ()
 
 stdWrap_editIcons (string $expect, string $content, array $conf, bool $login, int $times, array $param3, string $will)
 
 stdWrap_encapsLines ()
 
 stdWrap_encapsLines_HTML5SelfClosingTags (string $input, string $expected)
 
array html5SelfClosingTagsDataprovider ()
 
array stdWrap_editPanelDataProvider ()
 
 stdWrap_editPanel (string $expect, string $content, bool $login, int $times, string $will)
 
array[] stdWrap_encodeForJavaScriptValueDataProvider ()
 
 stdWrap_encodeForJavaScriptValue (string $expect, string $content)
 
array stdWrap_expandListDataProvider ()
 
 stdWrap_expandList (string $expected, string $content)
 
 stdWrap_field ()
 
array stdWrap_fieldRequiredDataProvider ()
 
 stdWrap_fieldRequired (string $expect, bool $stop, string $content, array $conf)
 
array hashDataProvider ()
 
 stdWrap_hash (string $expect, string $content, array $conf)
 
array stdWrap_htmlSpecialCharsDataProvider ()
 
 stdWrap_htmlSpecialChars (string $expected, string $input, array $conf)
 
array stdWrap_ifDataProvider ()
 
 stdWrap_if (string $expect, bool $stop, string $content, array $conf, int $times, $will)
 
array checkIfDataProvider ()
 
 checkIf (bool $expect, array $conf)
 
array stdWrap_ifBlankDataProvider ()
 
 stdWrap_ifBlank ($expect, $content, array $conf)
 
array stdWrap_ifEmptyDataProvider ()
 
 stdWrap_ifEmpty ($expect, $content, array $conf)
 
array stdWrap_ifNullDataProvider ()
 
 stdWrap_ifNull ($expect, $content, array $conf)
 
array stdWrap_innerWrapDataProvider ()
 
 stdWrap_innerWrap (string $expected, string $input, array $conf)
 
array stdWrap_innerWrap2DataProvider ()
 
 stdWrap_innerWrap2 (string $expected, string $input, array $conf)
 
 stdWrap_insertData ()
 
array stdWrap_insertDataProvider ()
 
 stdWrap_insertDataAndInputExamples ($expect, string $content)
 
array stdWrap_intvalDataProvider ()
 
 stdWrap_intval (int $expect, $content)
 
string[][] stdWrapKeywordsDataProvider ()
 
 stdWrap_keywords (string $expected, string $input)
 
array stdWrap_langDataProvider ()
 
 stdWrap_langViaSiteLanguage (string $expected, string $input, array $conf, string $language)
 
 stdWrap_listNum ()
 
array stdWrap_noTrimWrapDataProvider ()
 
 stdWrap_noTrimWrap (string $expect, string $content, array $conf)
 
 stdWrap_numRows ()
 
 stdWrap_numberFormat ()
 
array stdWrap_outerWrapDataProvider ()
 
 stdWrap_outerWrap (string $expected, string $input, array $conf)
 
array stdWrap_overrideDataProvider ()
 
 stdWrap_override ($expect, string $content, array $conf)
 
 stdWrap_parseFunc ()
 
 stdWrap_postCObject ()
 
 stdWrap_postUserFunc ()
 
 stdWrap_postUserFuncInt ()
 
 stdWrap_preCObject ()
 
 stdWrap_preIfEmptyListNum ()
 
array stdWrap_prefixCommentDataProvider ()
 
 stdWrap_prefixComment (string $expect, string $content, array $conf, $disable, int $times, string $will)
 
 stdWrap_prepend ()
 
array stdWrap_prioriCalcDataProvider ()
 
 stdWrap_prioriCalc ($expect, string $content, array $conf)
 
 stdWrap_preUserFunc ()
 
array stdWrap_rawUrlEncodeDataProvider ()
 
 stdWrap_rawUrlEncode (string $expect, string $content)
 
 stdWrap_replacement ()
 
array stdWrap_requiredDataProvider ()
 
 stdWrap_required ($expect, bool $stop, $content)
 
 stdWrap_round ()
 
 stdWrap_setContentToCurrent ()
 
array stdWrap_setCurrentDataProvider ()
 
 stdWrap_setCurrent (string $input, array $conf)
 
 stdWrap_split ()
 
 stdWrap_stdWrap ()
 
array stdWrap_stdWrapValueDataProvider ()
 
 stdWrap_stdWrapValue (string $key, array $configuration, string $defaultValue, string $expected)
 
array stdWrap_strPadDataProvider ()
 
 stdWrap_strPad (string $expect, string $content, array $conf)
 
array stdWrap_strftimeDataProvider ()
 
 stdWrap_strftime (string $expect, $content, array $conf, int $now)
 
 stdWrap_stripHtml ()
 
array stdWrap_strtotimeDataProvider ()
 
 stdWrap_strtotime ($expect, string $content, array $conf)
 
 stdWrap_substring ()
 
array stdWrap_trimDataProvider ()
 
 stdWrap_trim (string $expect, $content)
 
 stdWrap_typolink ()
 
array stdWrap_wrapDataProvider ()
 
 stdWrap_wrap (string $expected, string $input, array $conf)
 
array stdWrap_wrap2DataProvider ()
 
 stdWrap_wrap2 (string $expected, string $input, array $conf)
 
array stdWrap_wrap3DataProvider ()
 
 stdWrap_wrap3 (string $expected, string $input, array $conf)
 
array stdWrap_wrapAlignDataProvider ()
 
 stdWrap_wrapAlign (string $expect, string $content, $wrapAlignConf)
 
 getCurrentTable ()
 
array prefixCommentDataProvider ()
 
 prefixComment (string $expect, string $comment, string $content)
 
 setCurrentFile_getCurrentFile ()
 
 setCurrentVal_getCurrentVal ()
 
 setUserObjectType_getUserObjectType ()
 
array emailSpamProtectionWithTypeAsciiDataProvider ()
 
 mailSpamProtectionWithTypeAscii (string $content, string $expected)
 

Protected Member Functions

 setUp ()
 
TypoScriptFrontendController getFrontendController ()
 
 handleCharset (string &$subject, string &$expected)
 
PHPUnit Framework MockObject MockObject AbstractContentObject createContentObjectThrowingExceptionFixture ()
 
array getLibParseFunc ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
PHPUnit Framework MockObject MockObject AccessibleObjectInterface ContentObjectRenderer $subject
 
PHPUnit Framework MockObject MockObject TypoScriptFrontendController AccessibleObjectInterface $frontendControllerMock
 
PHPUnit Framework MockObject MockObject TemplateService $templateServiceMock
 
array $contentObjectMap
 
Prophecy Prophecy ObjectProphecy CacheManager $cacheManager
 
 $backupEnvironment = true
 

Private Member Functions

string rawUrlEncodeSquareBracketsInUrl (string $string)
 

Detailed Description

Test case

Definition at line 78 of file ContentObjectRendererTest.php.

Member Function Documentation

◆ allStdWrapProcessorsAreCallable()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::allStdWrapProcessorsAreCallable ( )

Check that all registered stdWrap processors are callable.

Show:

  • ‪The given invalidProcessor is counted as not callable.
  • ‪All stdWrap processors are counted as callable.
  • Their amount is 91.

    Test:

Definition at line 3159 of file ContentObjectRendererTest.php.

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

◆ aTagParamsHasLeadingSpaceIfNotEmpty()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::aTagParamsHasLeadingSpaceIfNotEmpty ( )
Test:

Definition at line 1918 of file ContentObjectRendererTest.php.

◆ aTagParamsHasNoLeadingSpaceIfEmpty()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::aTagParamsHasNoLeadingSpaceIfEmpty ( )
Test:

Definition at line 1937 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ aTagParamsHaveSpaceBetweenLocalAndGlobalParams()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::aTagParamsHaveSpaceBetweenLocalAndGlobalParams ( )
Test:

Definition at line 1927 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ calcAge()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::calcAge ( string  $expect,
int  $timestamp,
string  $labels 
)

Check if calcAge works properly.

Test:
‪@dataProvider calcAgeDataProvider
Parameters
string$expect
int$timestamp
string$labels

Definition at line 1253 of file ContentObjectRendererTest.php.

◆ calcAgeDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::calcAgeDataProvider ( )

Data provider for calcAge.

Returns
‪array [$expect, $timestamp, $labels]

Definition at line 1193 of file ContentObjectRendererTest.php.

◆ calculateCacheKey()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::calculateCacheKey ( string  $expect,
array  $conf,
int  $times,
  $with,
  $withWrap,
  $will 
)

Check if calculateCacheKey works properly.

  • ‪takes key from $conf['key']
  • processes key with stdWrap based on $conf['key.']

    Test:
    ‪@dataProvider calculateCacheKeyDataProvider
    Parameters
    string$expect‪Expected result.
    array$conf‪Properties 'key', 'key.'
    int$times‪Times called mocked method.
    string | null$with‪Parameter passed to mocked method.
    string | null$withWrap
    string | null$will‪Return value of mocked method.

Definition at line 2855 of file ContentObjectRendererTest.php.

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

◆ calculateCacheKeyDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::calculateCacheKeyDataProvider ( )

Check if calculateCacheKey works properly.

Returns
‪array Order: expect, conf, times, with, withWrap, will

Definition at line 2795 of file ContentObjectRendererTest.php.

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

◆ canNotAccessInternalContentObjectMapByReference()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::canNotAccessInternalContentObjectMapByReference ( )

Show that the map is not set as an externally accessible reference.

Prove is done by missing success when trying to use it this way.

See also
ContentObjectRendererTest::canRegisterAContentObjectClassForATypoScriptName
Test:

Definition at line 319 of file ContentObjectRendererTest.php.

◆ canRegisterAContentObjectClassForATypoScriptName()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::canRegisterAContentObjectClassForATypoScriptName ( )

Show registration of a class for a TypoScript object name and getting the registered content object is working.

Prove is done by successfully creating an object based on the mapping. Note two conditions in contrast to other tests, where the creation fails.

  1. ‪The type must be of AbstractContentObject.
  2. Registration can only be done by public methods.

    Test:

Definition at line 282 of file ContentObjectRendererTest.php.

◆ canSetTheContentObjectClassMapAndGetARegisteredContentObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::canSetTheContentObjectClassMapAndGetARegisteredContentObject ( )

Show that setting of the class map and getting a registered content object is working.

See also
ContentObjectRendererTest::canRegisterAContentObjectClassForATypoScriptName
Test:

Definition at line 301 of file ContentObjectRendererTest.php.

◆ caseshift()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::caseshift ( string  $expect,
string  $content,
string  $case 
)

Check if caseshift works properly.

Test:
‪@dataProvider caseshiftDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.
string$case‪The given type of conversion.

Definition at line 3055 of file ContentObjectRendererTest.php.

◆ caseshiftDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::caseshiftDataProvider ( )

Data provider for caseshift.

Returns
‪array [$expect, $content, $case]

Definition at line 3033 of file ContentObjectRendererTest.php.

◆ checkIf()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::checkIf ( bool  $expect,
array  $conf 
)

Check if checkIf works properly.

Test:
‪@dataProvider checkIfDataProvider
Parameters
bool$expect‪Whether result should be true or false.
array$conf‪TypoScript configuration to pass into checkIf

Definition at line 5365 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\checkIf().

◆ checkIfDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::checkIfDataProvider ( )

Data provider for checkIf.

Returns
‪array [$expect, $conf]

Definition at line 5345 of file ContentObjectRendererTest.php.

◆ createContentObjectThrowingExceptionFixture()

◆ cropHTML()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::cropHTML ( string  $expect,
string  $content,
string  $conf 
)

Check if cropHTML works properly.

Test:
‪@dataProvider cropHTMLDataProvider
Parameters
string$expect‪The expected cropped output.
string$content‪The given input.
string$conf‪The given configuration.

Definition at line 923 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\handleCharset().

◆ cropHTMLDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::cropHTMLDataProvider ( )

Data provider for cropHTML.

Provides combinations of text type and configuration.

Returns
‪array [$expect, $conf, $content]

Definition at line 621 of file ContentObjectRendererTest.php.

◆ cropIsMultibyteSafe()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::cropIsMultibyteSafe ( )
Test:

Definition at line 603 of file ContentObjectRendererTest.php.

◆ emailSpamProtectionWithTypeAsciiDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::emailSpamProtectionWithTypeAsciiDataProvider ( )

Data provider for emailSpamProtectionWithTypeAscii

Returns
‪array [$content, $expect]

Definition at line 7747 of file ContentObjectRendererTest.php.

◆ exceptionHandlerIsEnabledByDefaultInProductionContext()

◆ fourTypesOfStdWrapHookObjectProcessors()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::fourTypesOfStdWrapHookObjectProcessors ( string  $stdWrapMethod,
string  $hookObjectCall 
)

Check if stdWrapHookObject processors work properly.

Checks:

  • ‪stdWrap_stdWrapPreProcess
  • ‪stdWrap_stdWrapOverride
  • ‪stdWrap_stdWrapProcess
  • stdWrap_stdWrapPostProcess

    Test:
    ‪@dataProvider fourTypesOfStdWrapHookObjectProcessorsDataProvider
    Parameters
    string$stdWrapMethod‪: The method to cover.
    string$hookObjectCall‪: The expected hook object call.

Definition at line 3275 of file ContentObjectRendererTest.php.

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

◆ fourTypesOfStdWrapHookObjectProcessorsDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::fourTypesOfStdWrapHookObjectProcessorsDataProvider ( )

Data provider for fourTypesOfStdWrapHookObjectProcessors

Returns
‪array Order: stdWrap, hookObjectCall

Definition at line 3238 of file ContentObjectRendererTest.php.

◆ getCurrentTable()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getCurrentTable ( )

Check if getCurrentTable works properly.

Test:

Definition at line 7613 of file ContentObjectRendererTest.php.

◆ getDataWithTypeContext()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeContext ( )

Checks if getData() works with type "context"

Test:

Definition at line 1716 of file ContentObjectRendererTest.php.

◆ getDataWithTypeCurrent()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeCurrent ( )

Checks if getData() works with type "current"

Test:

Definition at line 1662 of file ContentObjectRendererTest.php.

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

◆ getDataWithTypeDate()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDate ( )

Checks if getData() works with type "date"

Test:

Definition at line 1636 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeDb()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDb ( )

Checks if getData() works with type "db"

Test:

Definition at line 1676 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeDebugData()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDebugData ( )

Checks if getData() works with type "debug:data"

Test:

Definition at line 1861 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\Utility\DebugUtility\useAnsiColor().

◆ getDataWithTypeDebugFullRootline()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDebugFullRootline ( )

Checks if getData() works with type "debug:fullRootLine"

Test:

Definition at line 1839 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\DebugUtility\useAnsiColor().

◆ getDataWithTypeDebugPage()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDebugPage ( )

Checks if getData() works with type "data:page"

Test:

Definition at line 1901 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\DebugUtility\useAnsiColor().

◆ getDataWithTypeDebugRegister()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDebugRegister ( )

Checks if getData() works with type "debug:register"

Test:

Definition at line 1881 of file ContentObjectRendererTest.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Core\Utility\DebugUtility\useAnsiColor().

◆ getDataWithTypeDebugRootline()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeDebugRootline ( )

Checks if getData() works with type "debug:rootLine"

Test:

Definition at line 1817 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\DebugUtility\useAnsiColor().

◆ getDataWithTypeField()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeField ( )

Checks if getData() works with type "field"

Test:

Definition at line 1406 of file ContentObjectRendererTest.php.

◆ getDataWithTypeFieldAndFieldIsMultiDimensional()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeFieldAndFieldIsMultiDimensional ( )

Checks if getData() works with type "field" of the field content is multi-dimensional (e.g. an array)

Test:

Definition at line 1421 of file ContentObjectRendererTest.php.

◆ getDataWithTypeFileReturnsUidOfFileObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeFileReturnsUidOfFileObject ( string  $typoScriptPath)

Basic check if getData gets the uid of a file object

Test:
‪@dataProvider getDataWithTypeFileReturnsUidOfFileObjectDataProvider

Definition at line 1451 of file ContentObjectRendererTest.php.

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

◆ getDataWithTypeFileReturnsUidOfFileObjectDataProvider()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeFileReturnsUidOfFileObjectDataProvider ( )

Definition at line 1430 of file ContentObjectRendererTest.php.

◆ getDataWithTypeFullrootline()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeFullrootline ( )

Checks if getData() works with type "fullrootline"

Test:

Definition at line 1615 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeGetenv()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeGetenv ( )

Checks if getData() works with type "getenv"

Test:

Definition at line 1381 of file ContentObjectRendererTest.php.

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

◆ getDataWithTypeGetindpenv()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeGetindpenv ( )

Checks if getData() works with type "getindpenv"

Test:

Definition at line 1394 of file ContentObjectRendererTest.php.

◆ getDataWithTypeGlobal()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeGlobal ( )

Checks if getData() works with type "global"

Test:

Definition at line 1530 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeGp()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeGp ( string  $key,
string  $expectedValue 
)

Checks if getData() works with type "gp"

Test:
‪@dataProvider getDataWithTypeGpDataProvider
Parameters
string$key
string$expectedValue

Definition at line 1353 of file ContentObjectRendererTest.php.

◆ getDataWithTypeGpDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeGpDataProvider ( )
Returns
‪array

Definition at line 1336 of file ContentObjectRendererTest.php.

◆ getDataWithTypeLevel()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLevel ( )

Checks if getData() works with type "level"

Test:

Definition at line 1513 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeLevelfield()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLevelfield ( )

Checks if getData() works with type "levelfield"

Test:

Definition at line 1597 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeLevelmedia()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLevelmedia ( )

Checks if getData() works with type "levelmedia"

Test:

Definition at line 1559 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeLeveltitle()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLeveltitle ( )

Checks if getData() works with type "leveltitle"

Test:

Definition at line 1540 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeLeveluid()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLeveluid ( )

Checks if getData() works with type "leveluid"

Test:

Definition at line 1578 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeLll()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeLll ( )

Checks if getData() works with type "lll"

Test:

Definition at line 1692 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ getDataWithTypePage()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypePage ( )

Checks if getData() works with type "page"

Test:

Definition at line 1650 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeParameters()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeParameters ( )

Checks if getData() works with type "parameters"

Test:

Definition at line 1465 of file ContentObjectRendererTest.php.

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

◆ getDataWithTypeParentRecordNumber()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeParentRecordNumber ( )

Checks if getData() works with type "parentRecordNumber"

Test:

Definition at line 1805 of file ContentObjectRendererTest.php.

◆ getDataWithTypePath()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypePath ( )

Checks if getData() works with type "path"

Test:

Definition at line 1705 of file ContentObjectRendererTest.php.

◆ getDataWithTypeRegister()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeRegister ( )

Checks if getData() works with type "register"

Test:

Definition at line 1479 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ getDataWithTypeSession()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeSession ( )

Checks if getData() works with type "session"

Test:

Definition at line 1493 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getDataWithTypeSite()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeSite ( )

Checks if getData() works with type "site"

Test:

Definition at line 1734 of file ContentObjectRendererTest.php.

◆ getDataWithTypeSiteLanguage()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeSiteLanguage ( )

Checks if getData() works with type "siteLanguage"

Test:

Definition at line 1786 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTestTrait\createSiteWithLanguage().

◆ getDataWithTypeSiteWithBaseVariants()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeSiteWithBaseVariants ( )

Checks if getData() works with type "site" and base variants

Test:

Definition at line 1754 of file ContentObjectRendererTest.php.

◆ getDataWithTypeTsfe()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getDataWithTypeTsfe ( )

Checks if getData() works with type "tsfe"

Test:

Definition at line 1371 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ getFieldVal()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getFieldVal (   $expect,
string  $fields 
)

Check that getFieldVal works properly.

Show:

  • ‪Returns the field from $this->data.
  • ‪The keys are trimmed.
  • ‪For a single key (no //) returns the field as is:
    • '' => ''
    • ‪null => null
    • ‪false => false
    • ‪true => true
    • 0 => 0
    • 1 => 1
    • ‪'string' => 'string'
  • ‪If '//' is present, explodes key candidates.
  • ‪Returns the first field, that is not "empty".
  • ‪"Empty" is checked after type cast to string by comparing to ''.
  • ‪The winning non-empty value is returned as is.
  • ‪The fallback, if all evals to empty, is the empty string ''.
  • '//' with single elements and empty string fallback results in:

    • '' => ''
    • ‪null => ''
    • ‪false => ''
    • ‪true => true
    • 0 => 0
    • 1 => 1
    • ‪'string' => 'string'
    Test:
    ‪@dataProvider getFieldValDataProvider
    Parameters
    string | null$expect‪The expected string.
    string$fields‪Field names divides by //.

Definition at line 3011 of file ContentObjectRendererTest.php.

References $fields.

◆ getFieldValDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getFieldValDataProvider ( )

Data provider for getFieldVal

Returns
‪array [$expect, $fields]

Definition at line 2942 of file ContentObjectRendererTest.php.

◆ getFromCache()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getFromCache (   $expect,
  $conf,
  $cacheKey,
  $times,
  $cached 
)

Check if getFromCache works properly.

  • ‪CalculateCacheKey is called to calc the cache key.
  • ‪$conf is passed on as parameter
  • ‪CacheFrontend is created and called if $cacheKey is not empty.
  • Else false is returned.

    Test:
    ‪@dataProvider getFromCacheDtataProvider
    Parameters
    string$expect‪Expected result.
    array$confConfiguration to pass to calculateCacheKey mock.
    string$cacheKey‪Return from calculateCacheKey mock.
    int$times‪Times the cache is expected to be called (0 or 1).
    string$cached‪Return from cacheFrontend mock.

Definition at line 2909 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$cacheManager, and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject.

◆ getFromCacheDtataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getFromCacheDtataProvider ( )

Data provider for getFromCache

Returns
‪array Order: expect, conf, cacheKey, times, cached.

Definition at line 2872 of file ContentObjectRendererTest.php.

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

◆ getFrontendController()

TypoScriptFrontendController TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getFrontendController ( )
protected

◆ getImgResourceCallsGetImgResourcePostProcessHook()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getImgResourceCallsGetImgResourcePostProcessHook ( )

◆ getLibParseFunc()

◆ getQueryArgumentsExcludesGetParameters()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsExcludesGetParameters ( )

◆ getQueryArgumentsExcludesParameters()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsExcludesParameters ( )

◆ getQueryArgumentsHandlesRemovedMethods()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsHandlesRemovedMethods ( string  $method,
string  $expectedMessage,
string  $expectedResult 
)
Parameters
string$method
string$expectedMessage
string$expectedResult
Test:
‪@dataProvider getQueryArgumentsHandlesRemovedMethodsDataProvider

Definition at line 577 of file ContentObjectRendererTest.php.

◆ getQueryArgumentsHandlesRemovedMethodsDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsHandlesRemovedMethodsDataProvider ( )
Returns
‪array

Definition at line 548 of file ContentObjectRendererTest.php.

◆ getQueryArgumentsOverrulesMultiDimensionalForcedParameters()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsOverrulesMultiDimensionalForcedParameters ( )

◆ getQueryArgumentsOverrulesMultiDimensionalParameters()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsOverrulesMultiDimensionalParameters ( )

◆ getQueryArgumentsOverrulesSingleParameter()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::getQueryArgumentsOverrulesSingleParameter ( )
Test:

Definition at line 439 of file ContentObjectRendererTest.php.

◆ globalExceptionHandlerConfigurationCanBeOverriddenByLocalConfiguration()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::globalExceptionHandlerConfigurationCanBeOverriddenByLocalConfiguration ( )

◆ handleCharset()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::handleCharset ( string &  $subject,
string &  $expected 
)
protected

Converts the subject and the expected result into utf-8.

Parameters
string$subject‪the subject, will be modified
string$expected‪the expected result, will be modified

Definition at line 204 of file ContentObjectRendererTest.php.

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

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\cropHTML().

◆ hashDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::hashDataProvider ( )

Data provider for the hash test

Returns
‪array [$expect, $content, $conf]

Definition at line 5124 of file ContentObjectRendererTest.php.

◆ html5SelfClosingTagsDataprovider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::html5SelfClosingTagsDataprovider ( )
Returns
‪array

Definition at line 4726 of file ContentObjectRendererTest.php.

◆ HTMLcaseshift()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::HTMLcaseshift ( string  $expect,
string  $content,
string  $case,
array  $with,
array  $will 
)

Check if HTMLcaseshift works properly.

Show:

  • ‪Only shifts the case of characters not part of tags.
  • Delegates to the method caseshift.

    Test:
    ‪@dataProvider HTMLcaseshiftDataProvider
    Parameters
    string$expect‪The expected output.
    string$content‪The given input.
    string$case‪The given type of conversion.
    array$with‪Consecutive args expected by caseshift.
    array$will‪Consecutive return values of caseshfit.

Definition at line 3129 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\HTMLcaseshift().

◆ HTMLcaseshiftDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::HTMLcaseshiftDataProvider ( )

Data provider for HTMLcaseshift.

Returns
‪array [$expect, $content, $case, $with, $will]

Definition at line 3068 of file ContentObjectRendererTest.php.

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

◆ isGetImgResourceHookCalledCallback()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::isGetImgResourceHookCalledCallback ( string  $file,
array  $fileArray,
  $imageResource,
ContentObjectRenderer  $parent 
)

Handles the arguments that have been sent to the getImgResource hook.

Parameters
string$file
array$fileArray
$imageResource
ContentObjectRenderer$parent
Returns
‪array
See also
‪getImgResourceHookGetsCalled

Definition at line 252 of file ContentObjectRendererTest.php.

◆ localConfigurationOverridesGlobalConfiguration()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::localConfigurationOverridesGlobalConfiguration ( )

◆ mailSpamProtectionWithTypeAscii()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::mailSpamProtectionWithTypeAscii ( string  $content,
string  $expected 
)

Check if email spam protection processes all UTF-8 characters properly

Test:
‪@dataProvider emailSpamProtectionWithTypeAsciiDataProvider
Parameters
string$content‪The parameter $content.
string$expected‪The expected output.

Definition at line 7778 of file ContentObjectRendererTest.php.

◆ notAllStdWrapProcessorsAreCallableWithEmptyConfiguration()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::notAllStdWrapProcessorsAreCallableWithEmptyConfiguration ( )

Check which stdWrap functions are callable with empty parameters.

Show:

  • ‪Almost all stdWrap_[type] are callable if called with 2 parameters:
    • ‪string $content Empty string.
    • ‪array $conf ['type' => '', 'type.' => []].
  • ‪Exceptions: stdWrap_numRows, stdWrap_split
  • The overall count is 91.

    Note:

    The two exceptions break, if the configuration is empty. This test just tracks the different behaviour to gain information. It doesn't mean that it is an issue.

    Test:

Definition at line 3198 of file ContentObjectRendererTest.php.

◆ numberFormat()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::numberFormat ( string  $expects,
  $content,
array  $conf 
)

Check if numberFormat works properly.

@dataProvider numberFormatDataProvider

Test:
Parameters
string$expects
mixed$content
array$conf

Definition at line 1109 of file ContentObjectRendererTest.php.

◆ numberFormatDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::numberFormatDataProvider ( )

Data provider for numberFormat.

Returns
‪array [$expect, $content, $conf]

Definition at line 1062 of file ContentObjectRendererTest.php.

◆ prefixComment()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::prefixComment ( string  $expect,
string  $comment,
string  $content 
)

Check if prefixComment works properly.

Test:
‪@dataProvider prefixCommentDataProvider
Parameters
string$expect‪The expected output.
string$comment‪The parameter $comment.
string$content‪The parameter $content.

Definition at line 7690 of file ContentObjectRendererTest.php.

◆ prefixCommentDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::prefixCommentDataProvider ( )

Data provider for prefixComment.

Returns
‪array [$expect, $comment, $content]

Definition at line 7623 of file ContentObjectRendererTest.php.

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

◆ rawUrlEncodeSquareBracketsInUrl()

◆ recursiveStdWrapIsOnlyCalledOnce()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::recursiveStdWrapIsOnlyCalledOnce ( )
Test:

Definition at line 1030 of file ContentObjectRendererTest.php.

◆ recursiveStdWrapProperlyRendersBasicString()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::recursiveStdWrapProperlyRendersBasicString ( )
Test:

Definition at line 1013 of file ContentObjectRendererTest.php.

◆ registersAllDefaultContentObjects()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::registersAllDefaultContentObjects ( string  $objectName,
string  $className 
)

Prove that all content objects are registered and a class is available for each of them.

Test:
‪@dataProvider registersAllDefaultContentObjectsDataProvider
Parameters
string$objectName‪TypoScript name of content object
string$className‪Expected class name

Definition at line 375 of file ContentObjectRendererTest.php.

◆ registersAllDefaultContentObjectsDataProvider()

string [][] TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::registersAllDefaultContentObjectsDataProvider ( )
Returns
‪string[][] [[$name, $fullClassName],]

Definition at line 357 of file ContentObjectRendererTest.php.

◆ renderedErrorMessageCanBeCustomized()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::renderedErrorMessageCanBeCustomized ( )

◆ renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredGlobally()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredGlobally ( )

◆ renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredLocally()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::renderingContentObjectDoesNotThrowExceptionIfExceptionHandlerIsConfiguredLocally ( )

◆ renderingContentObjectThrowsException()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::renderingContentObjectThrowsException ( )

◆ replacement()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::replacement ( string  $expects,
string  $content,
array  $conf 
)

Check if stdWrap.replacement and all of its properties work properly

Test:
‪@dataProvider replacementDataProvider
Parameters
string$content‪The given input.
string$expects‪The expected result.
array$conf‪The given configuration.

Definition at line 1180 of file ContentObjectRendererTest.php.

◆ replacementDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::replacementDataProvider ( )

Data provider replacement

Returns
‪array [$expect, $content, $conf]

Definition at line 1122 of file ContentObjectRendererTest.php.

◆ round()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::round ( float  $expect,
  $content,
array  $conf 
)

Check if round works properly

Show:

  • ‪Different types of input are casted to float.
  • Configuration ceil rounds like ceil().
  • Configuration floor rounds like floor().
  • ‪Otherwise rounds like round() and decimals can be applied.
  • ‪Always returns float.
Parameters
float$expect‪The expected output.
mixed$content‪The given content.
array$conf‪The given configuration of 'round.'. @dataProvider roundDataProvider
Test:

Definition at line 1002 of file ContentObjectRendererTest.php.

◆ roundDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::roundDataProvider ( )

Data provider for round

Returns
‪array [$expect, $content, $conf]

Definition at line 937 of file ContentObjectRendererTest.php.

◆ setCurrentFile_getCurrentFile()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::setCurrentFile_getCurrentFile ( )

Check setter and getter of currentFile work properly.

Test:

Definition at line 7703 of file ContentObjectRendererTest.php.

◆ setCurrentVal_getCurrentVal()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::setCurrentVal_getCurrentVal ( )

Check setter and getter of currentVal work properly.

Show it stored to $this->data[$this->currentValKey]. (The default value of currentValKey is tested elsewhere.)

Test:
See also
stdWrap_current()

Definition at line 7720 of file ContentObjectRendererTest.php.

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

◆ setUp()

◆ setUserObjectType_getUserObjectType()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::setUserObjectType_getUserObjectType ( )

Check setter and getter of userObjectType work properly.

Test:

Definition at line 7735 of file ContentObjectRendererTest.php.

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

◆ specificExceptionsCanBeIgnoredByExceptionHandler()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::specificExceptionsCanBeIgnoredByExceptionHandler ( )

◆ stdWrap_addPageCacheTagsAddsPageTags()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_addPageCacheTagsAddsPageTags ( array  $expectedTags,
array  $configuration 
)
Parameters
array$expectedTags
array$configuration
Test:
‪@dataProvider stdWrap_addPageCacheTagsAddsPageTagsDataProvider

Definition at line 3418 of file ContentObjectRendererTest.php.

◆ stdWrap_addPageCacheTagsAddsPageTagsDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_addPageCacheTagsAddsPageTagsDataProvider ( )
Returns
‪array

Definition at line 3391 of file ContentObjectRendererTest.php.

◆ stdWrap_age()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_age ( )

Check if stdWrap_age works properly.

Show:

  • ‪Delegates to calcAge.
  • ‪Parameter 1 is the difference between $content and EXEC_TIME.
  • ‪Parameter 2 is $conf['age'].
  • Returns the return value.

    Test:

Definition at line 3436 of file ContentObjectRendererTest.php.

References $GLOBALS, TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_age().

◆ stdWrap_append()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_append ( )

Check if stdWrap_append works properly.

Show:

  • ‪Delegates to the method cObjGetSingle().
  • ‪First parameter is $conf['append'].
  • ‪Second parameter is $conf['append.'].
  • ‪Third parameter is '/stdWrap/.append'.
  • Returns the return value appended to $content.

    Test:

Definition at line 3467 of file ContentObjectRendererTest.php.

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

◆ stdWrap_br()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_br (   $expected,
  $input,
  $xhtmlDoctype 
)

Test that stdWrap_br works as expected.

Parameters
string$expected‪The expected value.
string$input‪The input value.
string$xhtmlDoctype‪Xhtml document type.
Test:
‪@dataProvider stdWrapBrDataProvider

Definition at line 3529 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ stdWrap_brTag()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_brTag ( string  $input,
string  $expected,
array  $config 
)

Check if brTag works properly

Test:
‪@dataProvider stdWrapBrTagDataProvider
Parameters
string$input
string$expected
array$config

Definition at line 3580 of file ContentObjectRendererTest.php.

◆ stdWrap_bytes()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_bytes ( string  $expect,
string  $content,
array  $conf 
)

Check if stdWrap_bytes works properly.

Show:

  • ‪Delegates to GeneralUtility::formatSize
  • ‪Parameter 1 is $conf['bytes.'][labels'].
  • ‪Parameter 2 is $conf['bytes.'][base'].
  • ‪Returns the return value.

Note: As PHPUnit can't mock static methods, the call to GeneralUtility::formatSize can't be easily intercepted. The test is done by testing input/output pairs instead. To not duplicate the testing of formatSize just a few smoke tests are done here.

Test:
‪@dataProvider stdWrap_bytesDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.
array$conf‪The given configuration for 'bytes.'.

Definition at line 3647 of file ContentObjectRendererTest.php.

◆ stdWrap_bytesDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_bytesDataProvider ( )

Data provider for stdWrap_bytes.

Returns
‪array [$expect, $content, $conf]

Definition at line 3590 of file ContentObjectRendererTest.php.

◆ stdWrap_cacheRead()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cacheRead ( string  $expect,
string  $input,
array  $conf,
int  $times,
  $with,
  $will 
)

Check if stdWrap_cacheRead works properly.

  • ‪the method branches correctly
  • ‪getFromCache is called to fetch from cache
  • $conf['cache.'] is passed on as parameter

    Test:
    ‪@dataProvider stdWrap_cacheReadDataProvider
    Parameters
    string$expect‪Expected result.
    string$input‪Given input string.
    array$conf‪Property 'cache.'
    int$times‪Times called mocked method.
    string | null$with‪Parameter passed to mocked method.
    string | false$will‪Return value of mocked method.

Definition at line 3837 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_cacheRead().

◆ stdWrap_cacheReadDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cacheReadDataProvider ( )

Data provider for stdWrap_cacheRead

Returns
‪array Order: expect, input, conf, times, with, will

Definition at line 3781 of file ContentObjectRendererTest.php.

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

◆ stdWrap_cacheStore()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cacheStore (   $confCache,
int  $timesCCK,
  $key,
int  $times 
)

Check if stdWrap_cacheStore works properly.

Show:

  • ‪Returns $content as is.
  • ‪Returns immediate if $conf['cache.'] is not set.
  • ‪Returns immediate if calculateCacheKey returns an empty value.
  • ‪Calls calculateCacheKey with $conf['cache.'].
  • ‪Calls calculateCacheTags with $conf['cache.'].
  • ‪Calls calculateCacheLifetime with $conf['cache.'].
  • ‪Calls all configured user functions with $params, $this.
  • Calls set on the cache frontend with $key, $content, $tags, $lifetime.

    Test:
    ‪@dataProvider stdWrap_cacheStoreDataProvider
    Parameters
    array | null$confCacheConfiguration of 'cache.'
    int$timesCCK‪Times calculateCacheKey is called.
    string | null$key‪The return value of calculateCacheKey.
    int$times‪Times the other methods are called.

Definition at line 3912 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$cacheManager, $GLOBALS, TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, TYPO3\CMS\Core\Utility\StringUtility\getUniqueId(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_cacheStore().

◆ stdWrap_cacheStoreDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cacheStoreDataProvider ( )

Data provider for stdWrap_cacheStore.

Returns
‪array [$confCache, $timesCCK, $key, $times]

Definition at line 3865 of file ContentObjectRendererTest.php.

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

◆ stdWrap_case()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_case ( )

Check if stdWrap_case works properly.

Show:

  • ‪Delegates to method HTMLcaseshift.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['case'].
  • Returns the return value.

    Test:

Definition at line 4001 of file ContentObjectRendererTest.php.

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

◆ stdWrap_char()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_char ( )

Check if stdWrap_char works properly.

Test:

Definition at line 4027 of file ContentObjectRendererTest.php.

◆ stdWrap_cObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cObject ( )

Check if stdWrap_cObject works properly.

Show:

  • ‪Delegates to the method cObjGetSingle().
  • ‪Parameter 1 is $conf['cObject'].
  • ‪Parameter 2 is $conf['cObject.'].
  • ‪Parameter 3 is '/stdWrap/.cObject'.
  • Returns the return value.

    Test:

Definition at line 3675 of file ContentObjectRendererTest.php.

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

◆ stdWrap_crop()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_crop ( )

Check if stdWrap_crop works properly.

Show:

  • ‪Delegates to method listNum.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['crop'].
  • Returns the return value.

    Test:

Definition at line 4046 of file ContentObjectRendererTest.php.

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

◆ stdWrap_cropHTML()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_cropHTML ( )

Check if stdWrap_cropHTML works properly.

Show:

  • ‪Delegates to method cropHTML.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['cropHTML'].
  • Returns the return value.

    Test:

Definition at line 4079 of file ContentObjectRendererTest.php.

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

◆ stdWrap_csConv()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_csConv ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_csConv works properly.

Test:
‪@dataProvider stdWrap_csConvDataProvider
Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Property: csConv

Definition at line 4150 of file ContentObjectRendererTest.php.

◆ stdWrap_csConvDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_csConvDataProvider ( )

Data provider for stdWrap_csConv

Returns
‪array Order expected, input, conf

Definition at line 4105 of file ContentObjectRendererTest.php.

◆ stdWrap_current()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_current ( )

Check if stdWrap_current works properly.

Show:

  • ‪current is returned from $this->data
  • ‪the key is stored in $this->currentValKey
  • the key defaults to 'currentValue_kidjls9dksoje'

    Test:

Definition at line 4169 of file ContentObjectRendererTest.php.

◆ stdWrap_data()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_data ( array  $expect,
array  $data,
  $alt 
)

Checks that stdWrap_data works properly.

Show:

  • ‪Delegates to method getData.
  • ‪Parameter 1 is $conf['data'].
  • ‪Parameter 2 is property data by default.
  • ‪Parameter 2 is property alternativeData, if set as array.
  • ‪Property alternativeData is always unset to ''.
  • Returns the return value.

    Test:
    ‪@dataProvider stdWrap_dataDataProvider
    Parameters
    array$expect‪Expect either $data or $alternativeData.
    array$data‪The data.
    mixed$alt‪The alternativeData.

Definition at line 4229 of file ContentObjectRendererTest.php.

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

◆ stdWrap_dataDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_dataDataProvider ( )

Data provider for stdWrap_data.

Returns
‪array [$expect, $data, $alt]

Definition at line 4196 of file ContentObjectRendererTest.php.

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

◆ stdWrap_dataWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_dataWrap ( )

Check that stdWrap_dataWrap works properly.

Show:

  • ‪Delegates to method dataWrap.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['dataWrap'].
  • ‪Returns the return value.
Test:

Definition at line 4260 of file ContentObjectRendererTest.php.

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

◆ stdWrap_date()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_date ( string  $expected,
  $content,
array  $conf,
int  $now 
)

Check if stdWrap_date works properly.

Test:
‪@dataProvider stdWrap_dateDataProvider
Parameters
string$expected‪The expected output.
mixed$content‪The given input.
array$conf‪The given configuration.
int$now‪Fictive execution time.

Definition at line 4331 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ stdWrap_dateDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_dateDataProvider ( )

Data provider for the stdWrap_date test

Returns
‪array [$expect, $content, $conf, $now]

Definition at line 4286 of file ContentObjectRendererTest.php.

◆ stdWrap_debug()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_debug ( )

Check if stdWrap_debug works properly.

Test:

Definition at line 4345 of file ContentObjectRendererTest.php.

◆ stdWrap_debugData()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_debugData ( )

Check if stdWrap_debug works properly.

Show:

  • ‪Calls the function debug.
  • ‪Parameter 1 is $this->data.
  • ‪Parameter 2 is the string '$cObj->data:'.
  • ‪If $this->alternativeData is an array the same is repeated with:
  • ‪Parameter 1 is $this->alternativeData.
  • ‪Parameter 2 is the string '$cObj->alternativeData:'.
  • ‪Returns $content as is.

Note 1:

As PHPUnit can't mock PHP function calls, the call to debug can't be easily intercepted. The test is done indirectly by catching the frontend output of debug.

Note 2:

The second parameter to the debug function isn't used by the current implementation at all. It can't even indirectly be tested.

Test:

Definition at line 4379 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ stdWrap_debugFunc()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_debugFunc ( bool  $expectArray,
  $confDebugFunc 
)

Check if stdWrap_debugFunc works properly.

Show:

  • ‪Calls the function debug with one parameter.
  • ‪The parameter is the given $content string.
  • ‪The string is casted to array before, if (int)$conf['debugFunc'] is 2.
  • ‪Returns $content as is.

Note 1:

As PHPUnit can't mock PHP function calls, the call to debug can't be easily intercepted. The test is done indirectly by catching the frontend output of debug.

Test:
‪@dataProvider stdWrap_debugFuncDataProvider
Parameters
bool$expectArray‪If cast to array is expected.
mixed$confDebugFunc‪The configuration for $conf['debugFunc'].

Definition at line 4440 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\StringUtility\getUniqueId().

◆ stdWrap_debugFuncDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_debugFuncDataProvider ( )

Data provider for stdWrap_debugFunc.

Returns
‪array [$expectArray, $confDebugFunc]

Definition at line 4410 of file ContentObjectRendererTest.php.

◆ stdWrap_doubleBrTag()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_doubleBrTag ( string  $expected,
string  $input,
array  $config 
)

Check if doubleBrTag works properly

Test:
‪@dataProvider stdWrapDoubleBrTagDataProvider
Parameters
string$expected‪The expected value.
string$input‪The input value.
array$config‪The property 'doubleBrTag'.

Definition at line 4527 of file ContentObjectRendererTest.php.

◆ stdWrap_editIcons()

TYPO3\CMS\Frontend\Tests\Unit\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 4627 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_editIcons().

◆ stdWrap_editIconsDataProvider()

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

Data provider for stdWrap_editIcons.

Returns
‪array

Definition at line 4537 of file ContentObjectRendererTest.php.

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

◆ stdWrap_editPanel()

TYPO3\CMS\Frontend\Tests\Unit\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 4856 of file ContentObjectRendererTest.php.

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

◆ stdWrap_editPanelDataProvider()

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

Data provider for stdWrap_editPanel.

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

Definition at line 4813 of file ContentObjectRendererTest.php.

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

◆ stdWrap_encapsLines()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_encapsLines ( )

Check if stdWrap_encapsLines works properly.

Show:

  • ‪Delegates to method encaps_lineSplit.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['encapsLines'].
  • Returns the return value.

    Test:

Definition at line 4668 of file ContentObjectRendererTest.php.

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

◆ stdWrap_encapsLines_HTML5SelfClosingTags()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_encapsLines_HTML5SelfClosingTags ( string  $input,
string  $expected 
)

Check if stdWrap_encapsLines uses self closing tags only for allowed tags according to

See also
https://www.w3.org/TR/html5/syntax.html#void-elements
Test:
‪@dataProvider html5SelfClosingTagsDataprovider
Parameters
string$input
string$expected

Definition at line 4699 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTestTrait\getLibParseFunc_RTE().

◆ stdWrap_encodeForJavaScriptValue()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_encodeForJavaScriptValue ( string  $expect,
string  $content 
)

Check if encodeForJavaScriptValue works properly.

Test:
‪@dataProvider stdWrap_encodeForJavaScriptValueDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.

Definition at line 4931 of file ContentObjectRendererTest.php.

◆ stdWrap_encodeForJavaScriptValueDataProvider()

array [] TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_encodeForJavaScriptValueDataProvider ( )

Data provider for stdWrap_encodeForJavaScriptValue.

Returns
‪array[]

Definition at line 4889 of file ContentObjectRendererTest.php.

◆ stdWrap_expandList()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_expandList ( string  $expected,
string  $content 
)

Test for the stdWrap function "expandList"

The method simply delegates to GeneralUtility::expandList. There is no need to repeat the full set of tests of this method here. As PHPUnit can't mock static methods, to prove they are called, all we do here is to provide a few smoke tests.

Test:
‪@dataProvider stdWrap_expandListDataProvider
Parameters
string$expected‪The expected output.
string$content‪The given content.

Definition at line 4966 of file ContentObjectRendererTest.php.

◆ stdWrap_expandListDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_expandListDataProvider ( )

Data provider for expandList

Returns
‪array [$expect, $content]

Definition at line 4944 of file ContentObjectRendererTest.php.

◆ stdWrap_field()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_field ( )

◆ stdWrap_fieldRequired()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_fieldRequired ( string  $expect,
bool  $stop,
string  $content,
array  $conf 
)

Check if stdWrap_fieldRequired works properly.

Show:

  • ‪The value is taken from property array data.
  • ‪The key is taken from $conf['fieldRequired'].
  • ‪The value is casted to string by trim() and trimmed.
  • ‪It is further casted to boolean by if().
  • ‪False triggers a stop of further rendering.
  • ‪False returns '', true the given content as is.
Test:
‪@dataProvider stdWrap_fieldRequiredDataProvider
Parameters
string$expect‪The expected output.
bool$stop‪Expect stop further rendering.
string$content‪The given input.
array$conf‪The given configuration.

Definition at line 5094 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_fieldRequired().

◆ stdWrap_fieldRequiredDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_fieldRequiredDataProvider ( )

Data provider for stdWrap_fieldRequired.

Returns
‪array [$expect, $stop, $content, $conf]

Definition at line 5006 of file ContentObjectRendererTest.php.

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

◆ stdWrap_hash()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_hash ( string  $expect,
string  $content,
array  $conf 
)

Check if stdWrap_hash works properly.

Show:

  • ‪Algorithms: sha1, md5
  • ‪Returns '' for invalid algorithm.
  • ‪Value can be processed by stdWrap.
Test:
‪@dataProvider hashDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given content.
array$conf‪The given configuration.

Definition at line 5168 of file ContentObjectRendererTest.php.

◆ stdWrap_HTMLparser()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_HTMLparser ( string  $expect,
string  $content,
array  $conf,
int  $times,
string  $will 
)

Check if stdWrap_HTMLparser works properly

Show:

  • ‪Checks if $conf['HTMLparser.'] is an array.
  • ‪No:
    • ‪Returns $content as is.
  • Yes:

    • ‪Delegates to method HTMLparser_TSbridge.
    • ‪Parameter 1 is $content.
    • ‪Parameter 2 is $conf['HTMLparser'].
    • ‪Returns the return value.
    Test:
    ‪@dataProvider stdWrap_HTMLparserDataProvider
    Parameters
    string$expect‪The expected output.
    string$content‪The given content.
    array$conf‪The given configuration.
    int$times‪Times HTMLparser_TSbridge is called (0 or 1).
    string$will‪Return of HTMLparser_TSbridge.

Definition at line 3368 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_HTMLparser().

◆ stdWrap_HTMLparserDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_HTMLparserDataProvider ( )

Data provider for stdWrap_HTMLparser

Returns
‪array [$expect, $content, $conf, $times, $will].

Definition at line 3310 of file ContentObjectRendererTest.php.

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

◆ stdWrap_htmlSpecialChars()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_htmlSpecialChars ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_htmlSpecialChars works properly

Test:
‪@dataProvider stdWrap_htmlSpecialCharsDataProvider
Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪htmlSpecialChars.preserveEntities

Definition at line 5216 of file ContentObjectRendererTest.php.

◆ stdWrap_htmlSpecialCharsDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_htmlSpecialCharsDataProvider ( )

Data provider for stdWrap_htmlSpecialChars

Returns
‪array Order: expected, input, conf

Definition at line 5181 of file ContentObjectRendererTest.php.

◆ stdWrap_if()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_if ( string  $expect,
bool  $stop,
string  $content,
array  $conf,
int  $times,
  $will 
)

Check if stdWrap_if works properly.

Show:

  • ‪Delegates to the method checkIf to check for 'true'.
  • ‪The parameter to checkIf is $conf['if.'].
  • ‪Is also 'true' if $conf['if.'] is empty (PHP method empty).
  • ‪'False' triggers a stop of further rendering.
  • ‪Returns the content as is or '' if false.
Test:
‪@dataProvider stdWrap_ifDataProvider
Parameters
string$expect‪The expected output.
bool$stop‪Expect stop further rendering.
mixed$content‪The given content.
array$conf
int$times‪Times checkIf is called (0 or 1).
bool | null$will‪Return of checkIf (null if not called).

Definition at line 5323 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_if().

◆ stdWrap_ifBlank()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifBlank (   $expect,
  $content,
array  $conf 
)

Check that stdWrap_ifBlank works properly.

Show:

  • ‪The content is returned if not blank.
  • ‪Otherwise $conf['ifBlank'] is returned.
  • The check for blank is done by comparing the trimmed content with the empty string for equality.

    Test:
    ‪@dataProvider stdWrap_ifBlankDataProvider
    Parameters
    mixed$expect
    mixed$content‪The given input.
    array$conf‪The given configuration.

Definition at line 5414 of file ContentObjectRendererTest.php.

◆ stdWrap_ifBlankDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifBlankDataProvider ( )

Data provider for stdWrap_ifBlank.

Returns
‪array [$expect, $content, $conf]

Definition at line 5379 of file ContentObjectRendererTest.php.

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

◆ stdWrap_ifDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifDataProvider ( )

Data provider for stdWrap_if.

Returns
‪array [$expect, $stop, $content, $conf, $times, $will]

Definition at line 5229 of file ContentObjectRendererTest.php.

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

◆ stdWrap_ifEmpty()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifEmpty (   $expect,
  $content,
array  $conf 
)

Check that stdWrap_ifEmpty works properly.

Show:

  • ‪Returns the content, if not empty.
  • ‪Otherwise returns $conf['ifEmpty'].
  • Empty is checked by cast to boolean after trimming.

    Test:
    ‪@dataProvider stdWrap_ifEmptyDataProvider
    Parameters
    mixed$expect‪The expected output.
    mixed$content‪The given content.
    array$conf‪The given configuration.

Definition at line 5468 of file ContentObjectRendererTest.php.

◆ stdWrap_ifEmptyDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifEmptyDataProvider ( )

Data provider for stdWrap_ifEmpty.

Returns
‪array [$expect, $content, $conf]

Definition at line 5425 of file ContentObjectRendererTest.php.

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

◆ stdWrap_ifNull()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifNull (   $expect,
  $content,
array  $conf 
)

Check that stdWrap_ifNull works properly.

Show:

  • ‪Returns the content, if not null.
  • ‪Otherwise returns $conf['ifNull'].
  • Null is strictly checked by identity with null.

    Test:
    ‪@dataProvider stdWrap_ifNullDataProvider
    Parameters
    mixed$expect
    mixed$content‪The given input.
    array$conf‪The given configuration.

Definition at line 5510 of file ContentObjectRendererTest.php.

◆ stdWrap_ifNullDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_ifNullDataProvider ( )

Data provider for stdWrap_ifNull.

Returns
‪array [$expect, $content, $conf]

Definition at line 5479 of file ContentObjectRendererTest.php.

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

◆ stdWrap_innerWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_innerWrap ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_innerWrap works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Property: innerWrap
Test:
‪@dataProvider stdWrap_innerWrapDataProvider

Definition at line 5564 of file ContentObjectRendererTest.php.

◆ stdWrap_innerWrap2()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_innerWrap2 ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_innerWrap2 works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Property: innerWrap2
Test:
‪@dataProvider stdWrap_innerWrap2DataProvider

Definition at line 5620 of file ContentObjectRendererTest.php.

◆ stdWrap_innerWrap2DataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_innerWrap2DataProvider ( )

Data provider for stdWrap_innerWrap2

Returns
‪array Order expected, input, conf

Definition at line 5577 of file ContentObjectRendererTest.php.

◆ stdWrap_innerWrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_innerWrapDataProvider ( )

Data provider for stdWrap_innerWrap

Returns
‪array Order expected, input, conf

Definition at line 5521 of file ContentObjectRendererTest.php.

◆ stdWrap_insertData()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_insertData ( )

Check if stdWrap_insertData works properly.

Show:

  • ‪Delegates to method insertData.
  • ‪Parameter 1 is $content.
  • ‪Returns the return value.
Test:

Definition at line 5639 of file ContentObjectRendererTest.php.

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

◆ stdWrap_insertDataAndInputExamples()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_insertDataAndInputExamples (   $expect,
string  $content 
)

Check that stdWrap_insertData works properly with given input.

Test:
‪@dataProvider stdWrap_insertDataProvider
Parameters
mixed$expect‪The expected output.
string$content‪The given input.

Definition at line 5676 of file ContentObjectRendererTest.php.

◆ stdWrap_insertDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_insertDataProvider ( )

Data provider for stdWrap_insertData

Returns
‪array [$expect, $content]

Definition at line 5659 of file ContentObjectRendererTest.php.

◆ stdWrap_intval()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_intval ( int  $expect,
  $content 
)

Check that stdWrap_intval works properly.

Show:

  • ‪It does not round up.
  • All types of input is casted to int:

    • ‪null: 0
    • ‪false: 0
    • ‪true: 1
    Test:
    ‪@dataProvider stdWrap_intvalDataProvider
    Parameters
    int$expect‪The expected output.
    mixed$content‪The given input.

Definition at line 5730 of file ContentObjectRendererTest.php.

◆ stdWrap_intvalDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_intvalDataProvider ( )

Data provider for stdWrap_intval

Returns
‪array [$expect, $content]

Definition at line 5686 of file ContentObjectRendererTest.php.

◆ stdWrap_keywords()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_keywords ( string  $expected,
string  $input 
)

Check if stdWrap_keywords works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
Test:
‪@dataProvider stdWrapKeywordsDataProvider

Definition at line 5788 of file ContentObjectRendererTest.php.

◆ stdWrap_langDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_langDataProvider ( )

Data provider for stdWrap_lang

Returns
‪array Order expected, input, conf, language

Definition at line 5798 of file ContentObjectRendererTest.php.

◆ stdWrap_langViaSiteLanguage()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_langViaSiteLanguage ( string  $expected,
string  $input,
array  $conf,
string  $language 
)

Check if stdWrap_lang works properly with site handling.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Properties: lang.xy.
string$language‪For $TSFE->config[config][language].
Test:
‪@dataProvider stdWrap_langDataProvider

Definition at line 5864 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTestTrait\createSiteWithLanguage().

◆ stdWrap_listNum()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_listNum ( )

Check if stdWrap_listNum works properly.

Show:

  • ‪Delegates to method listNum.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['listNum'].
  • ‪Parameter 3 is $conf['listNum.']['splitChar'].
  • Returns the return value.

    Test:

Definition at line 5892 of file ContentObjectRendererTest.php.

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

◆ stdWrap_noTrimWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_noTrimWrap ( string  $expect,
string  $content,
array  $conf 
)

Check if stdWrap_noTrimWrap works properly.

Test:
‪@dataProvider stdWrap_noTrimWrapDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.
array$conf‪The given configuration.

Definition at line 5997 of file ContentObjectRendererTest.php.

◆ stdWrap_noTrimWrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_noTrimWrapDataProvider ( )

Data provider for stdWrap_noTrimWrap.

Returns
‪array [$expect, $content, $conf]

Definition at line 5924 of file ContentObjectRendererTest.php.

◆ stdWrap_numberFormat()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_numberFormat ( )

Check if stdWrap_numberFormat works properly.

Show:

  • ‪Delegates to the method numberFormat.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['numberFormat.'].
  • Returns the return value.

    Test:

Definition at line 6044 of file ContentObjectRendererTest.php.

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

◆ stdWrap_numRows()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_numRows ( )

Check if stdWrap_numRows works properly.

Show:

  • ‪Delegates to method numRows.
  • ‪Parameter is $conf['numRows.'].
  • Returns the return value.

    Test:

Definition at line 6016 of file ContentObjectRendererTest.php.

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

◆ stdWrap_orderedStdWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_orderedStdWrap (   $firstConf,
array  $secondConf,
array  $conf 
)

Check if stdWrap_orderedStdWrap works properly.

Show:

  • ‪For each entry of $conf['orderedStdWrap.'] stdWrap is applied to $content.
  • ‪The order is defined by the keys, after they have been casted to integers.
  • ‪Returns the processed $content after all entries have been applied.

Each test calls stdWrap two times. First $content is processed to $between, second $between is processed to $expect, the final return value. It is checked, if the expected parameters are given in the right consecutive order to stdWrap.

Test:
‪@dataProvider stdWrap_orderedStdWrapDataProvider
Parameters
array | null$firstConf‪Parameter 2 expected by first call to stdWrap.
array$secondConf‪Parameter 2 expected by second call to stdWrap.
array$conf‪The given configuration.

Definition at line 3757 of file ContentObjectRendererTest.php.

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

◆ stdWrap_orderedStdWrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_orderedStdWrapDataProvider ( )

Data provider for stdWrap_orderedStdWrap.

Returns
‪array [$firstConf, $secondConf, $conf]

Definition at line 3702 of file ContentObjectRendererTest.php.

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

◆ stdWrap_outerWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_outerWrap ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_outerWrap works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Property: outerWrap
Test:
‪@dataProvider stdWrap_outerWrapDataProvider

Definition at line 6113 of file ContentObjectRendererTest.php.

◆ stdWrap_outerWrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_outerWrapDataProvider ( )

Data provider for stdWrap_outerWrap

Returns
‪array Order expected, input, conf

Definition at line 6070 of file ContentObjectRendererTest.php.

◆ stdWrap_override()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_override (   $expect,
string  $content,
array  $conf 
)

Check if stdWrap_override works properly.

Test:
‪@dataProvider stdWrap_overrideDataProvider
Parameters
mixed$expect
string$content
array$conf‪Property: setCurrent

Definition at line 6201 of file ContentObjectRendererTest.php.

◆ stdWrap_overrideDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_overrideDataProvider ( )

Data provider for stdWrap_csConv

Returns
‪array Order expected, input, conf

Definition at line 6126 of file ContentObjectRendererTest.php.

◆ stdWrap_parseFunc()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_parseFunc ( )

Check if stdWrap_parseFunc works properly.

Show:

  • ‪Delegates to method parseFunc.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['parseFunc.'].
  • ‪Parameter 3 is $conf['parseFunc'].
  • Returns the return.

    Test:

Definition at line 6222 of file ContentObjectRendererTest.php.

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

◆ stdWrap_postCObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_postCObject ( )

Check if stdWrap_postCObject works properly.

Show:

  • ‪Delegates to the method cObjGetSingle().
  • ‪Parameter 1 is $conf['postCObject'].
  • ‪Parameter 2 is $conf['postCObject.'].
  • ‪Parameter 3 is '/stdWrap/.postCObject'.
  • Returns the return value appended by $content.

    Test:

Definition at line 6256 of file ContentObjectRendererTest.php.

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

◆ stdWrap_postUserFunc()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_postUserFunc ( )

Check that stdWrap_postUserFunc works properly.

Show:

  • ‪Delegates to method callUserFunction.
  • ‪Parameter 1 is $conf['postUserFunc'].
  • ‪Parameter 2 is $conf['postUserFunc.'].
  • ‪Returns the return value.
Test:

Definition at line 6289 of file ContentObjectRendererTest.php.

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

◆ stdWrap_postUserFuncInt()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_postUserFuncInt ( )

Check if stdWrap_postUserFuncInt works properly.

Show:

  • ‪Calls frontend controller method uniqueHash.
  • ‪Concatenates "INT_SCRIPT." and the returned hash to $substKey.
  • ‪Configures the frontend controller for 'INTincScript.$substKey'.
  • ‪The configuration array contains:
    • ‪content: $content
    • ‪postUserFunc: $conf['postUserFuncInt']
    • ‪conf: $conf['postUserFuncInt.']
    • ‪type: 'POSTUSERFUNC'
    • ‪cObj: serialized content renderer object
  • Returns "<!-- $substKey -->".

    Test:

Definition at line 6328 of file ContentObjectRendererTest.php.

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

◆ stdWrap_preCObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_preCObject ( )

Check if stdWrap_preCObject works properly.

Show:

  • ‪Delegates to the method cObjGetSingle().
  • ‪Parameter 1 is $conf['preCObject'].
  • ‪Parameter 2 is $conf['preCObject.'].
  • ‪Parameter 3 is '/stdWrap/.preCObject'.
  • Returns the return value appended by $content.

    Test:

Definition at line 6379 of file ContentObjectRendererTest.php.

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

◆ stdWrap_prefixComment()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_prefixComment ( string  $expect,
string  $content,
array  $conf,
  $disable,
int  $times,
string  $will 
)

Check that stdWrap_prefixComment works properly.

Show:

  • ‪Delegates to method prefixComment.
  • ‪Parameter 1 is $conf['prefixComment'].
  • ‪Parameter 2 is [].
  • ‪Parameter 3 is $content.
  • ‪Returns the return value.
  • ‪Returns $content as is,
    • ‪if $conf['prefixComment'] is empty.
    • ‪if 'config.disablePrefixComment' is configured by the frontend.
Test:
‪@dataProvider stdWrap_prefixCommentDataProvider
Parameters
string$expect
string$content
array$conf
$disable
int$times
string$will

Definition at line 6487 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_prefixComment().

◆ stdWrap_prefixCommentDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_prefixCommentDataProvider ( )

Data provider for stdWrap_prefixComment.

Returns
‪array [$expect, $content, $conf, $disable, $times, $will]

Definition at line 6446 of file ContentObjectRendererTest.php.

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

◆ stdWrap_preIfEmptyListNum()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_preIfEmptyListNum ( )

Check if stdWrap_preIfEmptyListNum works properly.

Show:

  • ‪Delegates to method listNum.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['preIfEmptyListNum'].
  • ‪Parameter 3 is $conf['preIfEmptyListNum.']['splitChar'].
  • Returns the return value.

    Test:

Definition at line 6414 of file ContentObjectRendererTest.php.

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

◆ stdWrap_prepend()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_prepend ( )

Check if stdWrap_prepend works properly.

Show:

  • ‪Delegates to the method cObjGetSingle().
  • ‪First parameter is $conf['prepend'].
  • ‪Second parameter is $conf['prepend.'].
  • ‪Third parameter is '/stdWrap/.prepend'.
  • Returns the return value prepended to $content.

    Test:

Definition at line 6523 of file ContentObjectRendererTest.php.

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

◆ stdWrap_preUserFunc()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_preUserFunc ( )

Check if stdWrap_preUserFunc works properly.

Show:

  • ‪Delegates to method callUserFunction.
  • ‪Parameter 1 is $conf['preUserFunc'].
  • ‪Parameter 2 is $conf['preUserFunc.'].
  • ‪Parameter 3 is $content.
  • Returns the return value.

    Test:

Definition at line 6600 of file ContentObjectRendererTest.php.

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

◆ stdWrap_prioriCalc()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_prioriCalc (   $expect,
string  $content,
array  $conf 
)

Check if stdWrap_prioriCalc works properly.

Show:

  • ‪If $conf['prioriCalc'] is 'intval' the return is casted to int.
  • ‪Delegates to MathUtility::calculateWithParentheses.

Note: As PHPUnit can't mock static methods, the call to MathUtility::calculateWithParentheses can't be easily intercepted. The test is done by testing input/output pairs instead. To not duplicate the testing of calculateWithParentheses just a few smoke tests are done here.

Test:
‪@dataProvider stdWrap_prioriCalcDataProvider
Parameters
mixed$expect‪The expected output.
string$content‪The given content.
array$conf‪The given configuration.

Definition at line 6581 of file ContentObjectRendererTest.php.

◆ stdWrap_prioriCalcDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_prioriCalcDataProvider ( )

Data provider for stdWrap_prioriCalc

Returns
‪array [$expect, $content, $conf]

Definition at line 6550 of file ContentObjectRendererTest.php.

◆ stdWrap_rawUrlEncode()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_rawUrlEncode ( string  $expect,
string  $content 
)

Check if rawUrlEncode works properly.

Test:
‪@dataProvider stdWrap_rawUrlEncodeDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.

Definition at line 6645 of file ContentObjectRendererTest.php.

◆ stdWrap_rawUrlEncodeDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_rawUrlEncodeDataProvider ( )

Data provider for stdWrap_rawUrlEncode

Returns
‪array [$expect, $content].

Definition at line 6623 of file ContentObjectRendererTest.php.

◆ stdWrap_replacement()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_replacement ( )

Check if stdWrap_replacement works properly.

Show:

  • ‪Delegates to method replacement.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['replacement.'].
  • Returns the return value.

    Test:

Definition at line 6665 of file ContentObjectRendererTest.php.

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

◆ stdWrap_required()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_required (   $expect,
bool  $stop,
  $content 
)

Check if stdWrap_required works properly.

Show:

  • ‪Content is empty if it equals '' after cast to string.
  • ‪Empty content triggers a stop of further rendering.
  • ‪Returns the content as is or '' for empty content.
Test:
‪@dataProvider stdWrap_requiredDataProvider
Parameters
mixed$expect‪The expected output.
bool$stop‪Expect stop further rendering.
mixed$content‪The given input.

Definition at line 6725 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\$subject, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrap_required().

◆ stdWrap_requiredDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_requiredDataProvider ( )

Data provider for stdWrap_required.

Returns
‪array [$expect, $stop, $content]

Definition at line 6691 of file ContentObjectRendererTest.php.

◆ stdWrap_round()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_round ( )

Check if stdWrap_round works properly

Show:

  • ‪Delegates to method round.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['round.'].
  • Returns the return value.

    Test:

Definition at line 6746 of file ContentObjectRendererTest.php.

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

◆ stdWrap_setContentToCurrent()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_setContentToCurrent ( )

Check if stdWrap_setContentToCurrent works properly.

Test:

Definition at line 6769 of file ContentObjectRendererTest.php.

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

◆ stdWrap_setCurrent()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_setCurrent ( string  $input,
array  $conf 
)

Check if stdWrap_setCurrent works properly.

Test:
‪@dataProvider stdWrap_setCurrentDataProvider
Parameters
string$input‪The input value.
array$conf‪Property: setCurrent

Definition at line 6827 of file ContentObjectRendererTest.php.

◆ stdWrap_setCurrentDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_setCurrentDataProvider ( )

Data provider for stdWrap_setCurrent

Returns
‪array Order input, conf

Definition at line 6785 of file ContentObjectRendererTest.php.

◆ stdWrap_split()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_split ( )

Check if stdWrap_split works properly.

Show:

  • ‪Delegates to method splitObj.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['split.'].
  • Returns the return value.

    Test:

Definition at line 6850 of file ContentObjectRendererTest.php.

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

◆ stdWrap_splitObjReturnsCount()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_splitObjReturnsCount ( )
Test:

Definition at line 2776 of file ContentObjectRendererTest.php.

◆ stdWrap_stdWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_stdWrap ( )

Check that stdWrap_stdWrap works properly.

Show:

  • ‪Delegates to method stdWrap.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['stdWrap.'].
  • ‪Returns the return value.
Test:

Definition at line 6882 of file ContentObjectRendererTest.php.

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

◆ stdWrap_stdWrapValue()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_stdWrapValue ( string  $key,
array  $configuration,
string  $defaultValue,
string  $expected 
)
Parameters
string$key
array$configuration
string$defaultValue
string$expected‪@dataProvider stdWrap_stdWrapValueDataProvider
Test:

Definition at line 6961 of file ContentObjectRendererTest.php.

◆ stdWrap_stdWrapValueDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_stdWrapValueDataProvider ( )

Data provider for stdWrap_stdWrapValue test

Returns
‪array

Definition at line 6905 of file ContentObjectRendererTest.php.

◆ stdWrap_strftime()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strftime ( string  $expect,
  $content,
array  $conf,
int  $now 
)

Check if stdWrap_strftime works properly.

Test:
‪@dataProvider stdWrap_strftimeDataProvider
Parameters
string$expect‪The expected output.
mixed$content‪The given input.
array$conf‪The given configuration.
int$now‪Fictive execution time.

Definition at line 7136 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ stdWrap_strftimeDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strftimeDataProvider ( )

Data provider for stdWrap_strftime

Returns
‪array [$expect, $content, $conf, $now]

Definition at line 7100 of file ContentObjectRendererTest.php.

◆ stdWrap_stripHtml()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_stripHtml ( )

Test for the stdWrap_stripHtml

Test:

Definition at line 7157 of file ContentObjectRendererTest.php.

◆ stdWrap_strPad()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strPad ( string  $expect,
string  $content,
array  $conf 
)

Check if stdWrap_strPad works properly.

Test:
‪@dataProvider stdWrap_strPadDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.
array$conf‪The configuration of 'strPad.'.

Definition at line 7088 of file ContentObjectRendererTest.php.

◆ stdWrap_strPadDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strPadDataProvider ( )

Data provider for stdWrap_strPad.

Returns
‪array [$expect, $content, $conf]

Definition at line 6976 of file ContentObjectRendererTest.php.

◆ stdWrap_strtotime()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strtotime (   $expect,
string  $content,
array  $conf 
)

Check if stdWrap_strtotime works properly.

Test:
‪@dataProvider stdWrap_strtotimeDataProvider
Parameters
int | null$expect‪The expected output.
string$content‪The given input.
array$conf‪The given configuration.

Definition at line 7214 of file ContentObjectRendererTest.php.

References $GLOBALS.

◆ stdWrap_strtotimeDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_strtotimeDataProvider ( )

Data provider for the stdWrap_strtotime test

Returns
‪array [$expect, $content, $conf]

Definition at line 7169 of file ContentObjectRendererTest.php.

◆ stdWrap_substring()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_substring ( )

Check if stdWrap_substring works properly.

Show:

  • ‪Delegates to method substring.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['substring'].
  • Returns the return value.

    Test:

Definition at line 7243 of file ContentObjectRendererTest.php.

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

◆ stdWrap_trim()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_trim ( string  $expect,
  $content 
)

Check that stdWrap_trim works properly.

Show:

  • ‪the given string is trimmed like PHP trim
  • ‪non-strings are casted to strings:
    • ‪null => 'null'
    • ‪false => ''
    • ‪true => '1'
    • 0 => '0'
    • -1 => '-1'
    • 1.0 => '1'
    • 1.1 => '1.1'
Test:
‪@dataProvider stdWrap_trimDataProvider
Parameters
string$expect
mixed$content‪The given content.

Definition at line 7322 of file ContentObjectRendererTest.php.

◆ stdWrap_trimDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_trimDataProvider ( )

Data provider for stdWrap_trim.

Returns
‪array [$expect, $content]

Definition at line 7269 of file ContentObjectRendererTest.php.

◆ stdWrap_typolink()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_typolink ( )

Check that stdWrap_typolink works properly.

Show:

  • ‪Delegates to method typolink.
  • ‪Parameter 1 is $content.
  • ‪Parameter 2 is $conf['typolink.'].
  • ‪Returns the return value.
Test:

Definition at line 7339 of file ContentObjectRendererTest.php.

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

◆ stdWrap_wrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrap ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_wrap works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Properties: wrap, wrap.splitChar
Test:
‪@dataProvider stdWrap_wrapDataProvider

Definition at line 7415 of file ContentObjectRendererTest.php.

◆ stdWrap_wrap2()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrap2 ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_wrap2 works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Properties: wrap2, wrap2.splitChar
Test:
‪@dataProvider stdWrap_wrap2DataProvider

Definition at line 7481 of file ContentObjectRendererTest.php.

◆ stdWrap_wrap2DataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrap2DataProvider ( )

Data provider for stdWrap_wrap2

Returns
‪array Order expected, input, conf

Definition at line 7428 of file ContentObjectRendererTest.php.

◆ stdWrap_wrap3()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrap3 ( string  $expected,
string  $input,
array  $conf 
)

Check if stdWrap_wrap3 works properly.

Parameters
string$expected‪The expected value.
string$input‪The input value.
array$conf‪Properties: wrap3, wrap3.splitChar
Test:
‪@dataProvider stdWrap_wrap3DataProvider

Definition at line 7544 of file ContentObjectRendererTest.php.

◆ stdWrap_wrap3DataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrap3DataProvider ( )

Data provider for stdWrap_wrap3

Returns
‪array Order expected, input, conf

Definition at line 7491 of file ContentObjectRendererTest.php.

◆ stdWrap_wrapAlign()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrapAlign ( string  $expect,
string  $content,
  $wrapAlignConf 
)

Check if stdWrap_wrapAlign works properly.

Show:

  • ‪Wraps $content with div and style attribute.
  • ‪The style attribute is taken from $conf['wrapAlign'].
  • ‪Returns the content as is,
  • if $conf['wrapAlign'] evals to false after being trimmed.

    Test:
    ‪@dataProvider stdWrap_wrapAlignDataProvider
    Parameters
    string$expect‪The expected output.
    string$content‪The given content.
    mixed$wrapAlignConf‪The given input.

Definition at line 7584 of file ContentObjectRendererTest.php.

◆ stdWrap_wrapAlignDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrapAlignDataProvider ( )

Data provider for stdWrap_wrapAlign.

Returns
‪array [$expect, $content, $conf]

Definition at line 7554 of file ContentObjectRendererTest.php.

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

◆ stdWrap_wrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrap_wrapDataProvider ( )

Data provider for stdWrap_wrap

Returns
‪array Order expected, input, conf

Definition at line 7362 of file ContentObjectRendererTest.php.

◆ stdWrapBrDataProvider()

string [][] TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapBrDataProvider ( )

Data provider for stdWrap_br

Returns
‪string[][] Order expected, given, xhtmlDoctype

Definition at line 3494 of file ContentObjectRendererTest.php.

◆ stdWrapBrTagDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapBrTagDataProvider ( )

Data provider for stdWrap_brTag

Returns
‪array

Definition at line 3540 of file ContentObjectRendererTest.php.

◆ stdWrapDoubleBrTagDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapDoubleBrTagDataProvider ( )

Data provider for stdWrap_doubleBrTag

Returns
‪array Order expected, input, config

Definition at line 4462 of file ContentObjectRendererTest.php.

◆ stdWrapKeywordsDataProvider()

string [][] TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapKeywordsDataProvider ( )

Data provider for stdWrap_keywords

Returns
‪string[][] Order expected, input

Definition at line 5740 of file ContentObjectRendererTest.php.

◆ stdWrapReturnsExpectation()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapReturnsExpectation ( string  $content,
array  $configuration,
string  $expectation 
)
Parameters
string$content
array$configuration
string$expectation‪@dataProvider stdWrapReturnsExpectationDataProvider
Test:

Definition at line 1286 of file ContentObjectRendererTest.php.

◆ stdWrapReturnsExpectationDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::stdWrapReturnsExpectationDataProvider ( )
Returns
‪array

Definition at line 1264 of file ContentObjectRendererTest.php.

◆ substring()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::substring ( string  $expect,
string  $content,
string  $conf 
)

Check if substring works properly.

Test:
‪@dataProvider substringDataProvider
Parameters
string$expect‪The expected output.
string$content‪The given input.
string$conf‪The given configuration.

Definition at line 1324 of file ContentObjectRendererTest.php.

◆ substringDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::substringDataProvider ( )

Data provider for substring

Returns
‪array [$expect, $content, $conf]

Definition at line 1296 of file ContentObjectRendererTest.php.

◆ typoLinkEncodesMailAddressForSpamProtection()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typoLinkEncodesMailAddressForSpamProtection ( array  $settings,
  $linkText,
  $mailAddress,
  $expected 
)
Parameters
array$settings
string$linkText
string$mailAddress
string$expected‪@dataProvider typoLinkEncodesMailAddressForSpamProtectionDataProvider
Test:

Definition at line 2283 of file ContentObjectRendererTest.php.

References TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getFrontendController().

◆ typoLinkEncodesMailAddressForSpamProtectionDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typoLinkEncodesMailAddressForSpamProtectionDataProvider ( )
Returns
‪array

Definition at line 2299 of file ContentObjectRendererTest.php.

◆ typoLinkLogsErrorIfNoLinkResolvingIsPossible()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typoLinkLogsErrorIfNoLinkResolvingIsPossible ( )
Test:

Definition at line 2761 of file ContentObjectRendererTest.php.

◆ typolinkOpensInNewWindow()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkOpensInNewWindow ( )

◆ typolinkReturnsCorrectLinksFiles()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksFiles (   $linkText,
  $configuration,
  $expectedResult 
)
Test:
Parameters
string$linkText
array$configuration
string$expectedResult‪@dataProvider typolinkReturnsCorrectLinksFilesDataProvider

Definition at line 2512 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getLibParseFunc().

◆ typolinkReturnsCorrectLinksFilesDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksFilesDataProvider ( )
Returns
‪array

Definition at line 2408 of file ContentObjectRendererTest.php.

◆ typolinkReturnsCorrectLinksForEmailsAndUrls()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksForEmailsAndUrls (   $linkText,
  $configuration,
  $expectedResult 
)
Test:
Parameters
string$linkText
array$configuration
string$expectedResult‪@dataProvider typolinkReturnsCorrectLinksForEmailsAndUrlsDataProvider

Definition at line 2244 of file ContentObjectRendererTest.php.

References $GLOBALS, TYPO3\CMS\Core\Core\Environment\getConfigPath(), and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getLibParseFunc().

◆ typolinkReturnsCorrectLinksForEmailsAndUrlsDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksForEmailsAndUrlsDataProvider ( )
Returns
‪array

Definition at line 2135 of file ContentObjectRendererTest.php.

◆ typolinkReturnsCorrectLinksForFilesWithAbsRefPrefix()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksForFilesWithAbsRefPrefix (   $linkText,
  $configuration,
  $absRefPrefix,
  $expectedResult 
)
Test:
Parameters
string$linkText
array$configuration
string$absRefPrefix
string$expectedResult‪@dataProvider typolinkReturnsCorrectLinksForFilesWithAbsRefPrefixDataProvider

Definition at line 2676 of file ContentObjectRendererTest.php.

References $GLOBALS, and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getLibParseFunc().

◆ typolinkReturnsCorrectLinksForFilesWithAbsRefPrefixDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typolinkReturnsCorrectLinksForFilesWithAbsRefPrefixDataProvider ( )
Returns
‪array

Definition at line 2544 of file ContentObjectRendererTest.php.

◆ typoLinkReturnsOnlyLinkTextIfNoLinkResolvingIsPossible()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::typoLinkReturnsOnlyLinkTextIfNoLinkResolvingIsPossible ( )
Test:

Definition at line 2749 of file ContentObjectRendererTest.php.

◆ willReturnNullForUnregisteredObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::willReturnNullForUnregisteredObject ( )

◆ willThrowAnExceptionForARegisteredNonContentObject()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::willThrowAnExceptionForARegisteredNonContentObject ( )

Member Data Documentation

◆ $backupEnvironment

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

Definition at line 128 of file ContentObjectRendererTest.php.

◆ $cacheManager

Prophecy Prophecy ObjectProphecy CacheManager TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::$cacheManager
protected

◆ $contentObjectMap

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::$contentObjectMap
protected
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,
'TEMPLATE' => TemplateContentObject::class,
'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
'SVG' => ScalableVectorGraphicsContentObject::class,
'EDITPANEL' => EditPanelContentObject::class
)

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

Definition at line 101 of file ContentObjectRendererTest.php.

◆ $frontendControllerMock

PHPUnit Framework MockObject MockObject TypoScriptFrontendController AccessibleObjectInterface TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::$frontendControllerMock
protected

◆ $resetSingletonInstances

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

Reset singletons created by subject

Definition at line 83 of file ContentObjectRendererTest.php.

◆ $subject

PHPUnit Framework MockObject MockObject AccessibleObjectInterface ContentObjectRenderer TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::$subject
protected

Definition at line 87 of file ContentObjectRendererTest.php.

Referenced by TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\allStdWrapProcessorsAreCallable(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\calculateCacheKey(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\checkIf(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\getFromCache(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\handleCharset(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\HTMLcaseshift(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_age(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_append(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cacheRead(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cacheStore(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_case(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cObject(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_crop(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_cropHTML(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_data(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_dataWrap(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_editIcons(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_editPanel(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_encapsLines(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_field(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_fieldRequired(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_HTMLparser(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_if(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_insertData(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_listNum(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_numberFormat(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_numRows(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_orderedStdWrap(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_parseFunc(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postCObject(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postUserFunc(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_postUserFuncInt(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preCObject(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_prefixComment(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preIfEmptyListNum(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_prepend(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_preUserFunc(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_replacement(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_required(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_round(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_split(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_stdWrap(), TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_substring(), and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest\stdWrap_typolink().

◆ $templateServiceMock

PHPUnit Framework MockObject MockObject TemplateService TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ContentObjectRendererTest::$templateServiceMock
protected