‪TYPO3CMS  11.5
TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest:

Public Member Functions

array getSubpartDataProvider ()
 
 getSubpart (string $content, string $marker, string $expected)
 
array substituteSubpartDataProvider ()
 
 substituteSubpart (string $content, string $marker, $subpartContent, bool $recursive, bool $keepMarker, string $expected)
 
 substituteMarkerArrayDataProvider ()
 
 substituteMarkerArray (string $content, array $markContentArray, string $wrap, bool $uppercase, bool $deleteUnused, string $expected)
 
 substituteMarkerDataProvider ()
 
 substituteMarker (string $content, string $marker, $markContent, string $expected)
 
array substituteSubpartArrayDataProvider ()
 
 substituteSubpartArray (string $content, array $subpartsContent, string $expected)
 
array substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider ()
 
 substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray (string $template, array $markersAndSubparts, string $wrap, bool $uppercase, bool $deleteUnused, string $expected)
 
array substituteMarkerArrayCachedReturnsExpectedContentDataProvider ()
 
 substituteMarkerArrayCachedReturnsExpectedContent (string $content, array $markContentArray, array $subpartContentArray, array $wrappedSubpartContentArray, string $expectedContent)
 

Protected Member Functions

 setUp ()
 

Protected Attributes

MarkerBasedTemplateService $templateService
 
bool $resetSingletonInstances = true
 

Detailed Description

Unit test for marker utility

Definition at line 31 of file MarkerBasedTemplateServiceTest.php.

Member Function Documentation

◆ getSubpart()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::getSubpart ( string  $content,
string  $marker,
string  $expected 
)
Test:
Parameters
string$content
string$marker
string$expected‪@dataProvider getSubpartDataProvider

Definition at line 128 of file MarkerBasedTemplateServiceTest.php.

◆ getSubpartDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::getSubpartDataProvider ( )

Data provider for getSubpart

Returns
‪array

Definition at line 58 of file MarkerBasedTemplateServiceTest.php.

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::setUp ( )
protected

Set up

Definition at line 43 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarker()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarker ( string  $content,
string  $marker,
  $markContent,
string  $expected 
)

@dataProvider substituteMarkerDataProvider

Parameters
string$content‪The content stream, typically HTML template content.
string$marker‪The marker string, typically on the form "###[the marker string]###
mixed$markContent‪The content to insert instead of the marker string found.
string$expected‪The expected result of the substitution

Definition at line 405 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray ( string  $template,
array  $markersAndSubparts,
string  $wrap,
bool  $uppercase,
bool  $deleteUnused,
string  $expected 
)
Test:
Parameters
string$template
array$markersAndSubparts
string$wrap
bool$uppercase
bool$deleteUnused
string$expected‪@dataProvider substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider

Definition at line 654 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider ( )

Data provider for substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray

Returns
‪array

Definition at line 452 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerArray()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerArray ( string  $content,
array  $markContentArray,
string  $wrap,
bool  $uppercase,
bool  $deleteUnused,
string  $expected 
)
Test:
‪@dataProvider substituteMarkerArrayDataProvider
Parameters
string$content‪The content stream, typically HTML template content.
array$markContentArray‪The array of key/value pairs being marker/content values used in the substitution. For each element in this array the function will substitute a marker in the content stream with the content.
string$wrap‪A wrap value - [part 1] | [part 2] - for the markers before substitution
bool$uppercase‪If set, all marker string substitution is done with upper-case markers.
bool$deleteUnused‪If set, all unused marker are deleted.
string$expected

Definition at line 363 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerArrayCachedReturnsExpectedContent()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerArrayCachedReturnsExpectedContent ( string  $content,
array  $markContentArray,
array  $subpartContentArray,
array  $wrappedSubpartContentArray,
string  $expectedContent 
)
Test:
‪@dataProvider substituteMarkerArrayCachedReturnsExpectedContentDataProvider
Parameters
string$content
array$markContentArray
array$subpartContentArray
array$wrappedSubpartContentArray
string$expectedContent

Definition at line 783 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerArrayCachedReturnsExpectedContentDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerArrayCachedReturnsExpectedContentDataProvider ( )
Returns
‪array

Definition at line 677 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerArrayDataProvider()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerArrayDataProvider ( )

Data provider for substituteMarkerArray

Definition at line 281 of file MarkerBasedTemplateServiceTest.php.

◆ substituteMarkerDataProvider()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteMarkerDataProvider ( )

Data provider for substituteMarker

Definition at line 380 of file MarkerBasedTemplateServiceTest.php.

◆ substituteSubpart()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteSubpart ( string  $content,
string  $marker,
  $subpartContent,
bool  $recursive,
bool  $keepMarker,
string  $expected 
)
Test:
Parameters
string$content
string$marker
string | array$subpartContent
bool$recursive
bool$keepMarker
string$expected‪@dataProvider substituteSubpartDataProvider

Definition at line 264 of file MarkerBasedTemplateServiceTest.php.

◆ substituteSubpartArray()

TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteSubpartArray ( string  $content,
array  $subpartsContent,
string  $expected 
)
Test:
Parameters
string$content
array$subpartsContent
string$expected‪@dataProvider substituteSubpartArrayDataProvider

Definition at line 442 of file MarkerBasedTemplateServiceTest.php.

◆ substituteSubpartArrayDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteSubpartArrayDataProvider ( )

Data provider for substituteSubpartArray

Returns
‪array

Definition at line 415 of file MarkerBasedTemplateServiceTest.php.

◆ substituteSubpartDataProvider()

array TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::substituteSubpartDataProvider ( )

Data provider for substituteSubpart

Returns
‪array

Definition at line 138 of file MarkerBasedTemplateServiceTest.php.

Member Data Documentation

◆ $resetSingletonInstances

bool TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::$resetSingletonInstances = true
protected

Reset singletons created by subject

Definition at line 38 of file MarkerBasedTemplateServiceTest.php.

◆ $templateService

MarkerBasedTemplateService TYPO3\CMS\Core\Tests\Unit\Service\MarkerBasedTemplateServiceTest::$templateService
protected

Definition at line 34 of file MarkerBasedTemplateServiceTest.php.