TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
MarkerBasedTemplateServiceTest Class Reference
Inheritance diagram for MarkerBasedTemplateServiceTest:
UnitTestCase BaseTestCase

Public Member Functions

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

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from BaseTestCase
 getAccessibleMock ($originalClassName, $methods=[], array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name,...$arguments)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix= '')
 

Protected Attributes

 $templateService
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Unit test for marker utility

Definition at line 23 of file MarkerBasedTemplateServiceTest.php.

Member Function Documentation

getSubpart (   $content,
  $marker,
  $expected 
)
Test:
Parameters
string$content
string$marker
string$expectedgetSubpartDataProvider

Definition at line 110 of file MarkerBasedTemplateServiceTest.php.

getSubpartDataProvider ( )

Data provider for getSubpart

Returns
array

Definition at line 40 of file MarkerBasedTemplateServiceTest.php.

setUp ( )
protected

Definition at line 30 of file MarkerBasedTemplateServiceTest.php.

References GeneralUtility\makeInstance().

substituteMarker (   $content,
  $marker,
  $markContent,
  $expected 
)

substituteMarkerDataProvider

Parameters
string$contentThe content stream, typically HTML template content.
string$markerThe marker string, typically on the form "###[the marker string]###
mixed$markContentThe content to insert instead of the marker string found.
string$expectedThe expected result of the substitution

Definition at line 357 of file MarkerBasedTemplateServiceTest.php.

substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray (   $template,
  $markersAndSubparts,
  $wrap,
  $uppercase,
  $deleteUnused,
  $expected 
)
Test:
Parameters
string$template
array$markersAndSubparts
string$wrap
bool$uppercase
bool$deleteUnused
string$expectedsubstituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider

Definition at line 604 of file MarkerBasedTemplateServiceTest.php.

substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider ( )

Data provider for substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray

Returns
array

Definition at line 402 of file MarkerBasedTemplateServiceTest.php.

substituteMarkerArray (   $content,
  $markContentArray,
  $wrap,
  $uppercase,
  $deleteUnused,
  $expected 
)
Test:
substituteMarkerArrayDataProvider
Parameters
string$contentThe content stream, typically HTML template content.
array$markContentArrayThe 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$wrapA wrap value - [part 1] | [part 2] - for the markers before substitution
bool$uppercaseIf set, all marker string substitution is done with upper-case markers.
bool$deleteUnusedIf set, all unused marker are deleted.
string$expected

Definition at line 324 of file MarkerBasedTemplateServiceTest.php.

substituteMarkerArrayDataProvider ( )

Data provider for substituteMarkerArray

Definition at line 254 of file MarkerBasedTemplateServiceTest.php.

substituteMarkerDataProvider ( )

Data provider for substituteMarker

Definition at line 332 of file MarkerBasedTemplateServiceTest.php.

substituteSubpart (   $content,
  $marker,
  $subpartContent,
  $recursive,
  $keepMarker,
  $expected 
)
Test:
Parameters
string$content
string$marker
array$subpartContent
bool$recursive
bool$keepMarker
string$expectedsubstituteSubpartDataProvider

Definition at line 246 of file MarkerBasedTemplateServiceTest.php.

substituteSubpartArray (   $content,
array  $subpartsContent,
  $expected 
)
Test:
Parameters
string$content
array$subpartsContent
string$expectedsubstituteSubpartArrayDataProvider

Definition at line 392 of file MarkerBasedTemplateServiceTest.php.

substituteSubpartArrayDataProvider ( )

Data provider for substituteSubpartArray

Returns
array

Definition at line 367 of file MarkerBasedTemplateServiceTest.php.

substituteSubpartDataProvider ( )

Data provider for substituteSubpart

Returns
array

Definition at line 120 of file MarkerBasedTemplateServiceTest.php.

Member Data Documentation

$templateService
protected

Definition at line 28 of file MarkerBasedTemplateServiceTest.php.