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

Public Member Functions

array getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider ()
 
 getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFound ($key, $configuration)
 
array getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider ()
 
 getImageTagTemplateReturnTemplateElementIdentifiedByKey ($key, $configuration, $expectation)
 
array getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider ()
 
 getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefined ( $layoutKey, $configuration, $file)
 
 getImageSourceCollectionRendersDefinedSources ()
 
array getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider ()
 
 getImageSourceCollectionRendersDefinedLayoutKeyDefault ($layoutKey, $configuration)
 
array getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider ()
 
 getImageSourceCollectionRendersDefinedLayoutKeyData ( $layoutKey, $configuration, $xhtmlDoctype, $expectedHtml)
 
 getImageSourceCollectionHookCalled ()
 
string isGetOneSourceCollectionCalledCallback (array $sourceRenderConfiguration, array $sourceConfiguration, $oneSourceCollection, $parent)
 
array linkWrapDataProvider ()
 
 linkWrap (string $expected, string $content, $wrap)
 

Protected Member Functions

 setUp ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
ImageContentObject $subject
 

Detailed Description

Definition at line 29 of file ImageContentObjectTest.php.

Member Function Documentation

◆ getImageSourceCollectionHookCalled()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionHookCalled ( )

◆ getImageSourceCollectionRendersDefinedLayoutKeyData()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionRendersDefinedLayoutKeyData (   $layoutKey,
  $configuration,
  $xhtmlDoctype,
  $expectedHtml 
)

Make sure the generation of subimages renders the expected HTML Code for the sourceset

Test:
‪@dataProvider getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider
Parameters
string$layoutKey
array$configuration
string$xhtmlDoctype
string$expectedHtml

Definition at line 368 of file ImageContentObjectTest.php.

References $GLOBALS, and TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest\$subject.

◆ getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider ( )

Data provider for the getImageSourceCollectionRendersDefinedLayoutKeyData test

Returns
‪array multi-dimensional array with the second level like this:
See also
getImageSourceCollectionRendersDefinedLayoutKeyData

Definition at line 276 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider ( )

Data provider for the getImageSourceCollectionRendersDefinedLayoutKeyDefault test

Returns
‪array multi-dimensional array with the second level like this:
See also
getImageSourceCollectionRendersDefinedLayoutKeyDefault

Definition at line 204 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionRendersDefinedLayoutKeyDefault()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionRendersDefinedLayoutKeyDefault (   $layoutKey,
  $configuration 
)

Make sure the generation of subimages renders the expected HTML Code for the sourceset

Test:
‪@dataProvider getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider
Parameters
string$layoutKey
array$configuration

Definition at line 247 of file ImageContentObjectTest.php.

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

◆ getImageSourceCollectionRendersDefinedSources()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionRendersDefinedSources ( )

Make sure the generation of subimages calls the generation of the subimages and uses the layout -> source template

Test:

Definition at line 151 of file ImageContentObjectTest.php.

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

◆ getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefined()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefined (   $layoutKey,
  $configuration,
  $file 
)

Make sure the source collection is empty if no valid configuration or source collection is defined

Test:
‪@dataProvider getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider
Parameters
string$layoutKey
array$configuration
string$file

Definition at line 137 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider ( )
Returns
‪array

Definition at line 119 of file ImageContentObjectTest.php.

◆ getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFound()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFound (   $key,
  $configuration 
)

Make sure that the rendering falls back to the classic <img style if nothing else is found

Test:
‪@dataProvider getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider
Parameters
string$key
array$configuration

Definition at line 72 of file ImageContentObjectTest.php.

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

◆ getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider ( )
Returns
‪array

Definition at line 54 of file ImageContentObjectTest.php.

◆ getImageTagTemplateReturnTemplateElementIdentifiedByKey()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateReturnTemplateElementIdentifiedByKey (   $key,
  $configuration,
  $expectation 
)

Assure if a layoutKey and layout is given the selected layout is returned

Test:
‪@dataProvider getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider
Parameters
string$key
array$configuration
string$expectation

Definition at line 110 of file ImageContentObjectTest.php.

◆ getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider ( )
Returns
‪array

Definition at line 83 of file ImageContentObjectTest.php.

◆ isGetOneSourceCollectionCalledCallback()

string TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::isGetOneSourceCollectionCalledCallback ( array  $sourceRenderConfiguration,
array  $sourceConfiguration,
  $oneSourceCollection,
  $parent 
)

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

Parameters
array$sourceRenderConfiguration
array$sourceConfiguration
$oneSourceCollection
$parent
Returns
‪string
See also
getImageSourceCollectionHookCalled

Definition at line 478 of file ImageContentObjectTest.php.

◆ linkWrap()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::linkWrap ( string  $expected,
string  $content,
  $wrap 
)

Check if linkWrap works properly.

Test:
‪@dataProvider linkWrapDataProvider
Parameters
string$expected‪The expected output.
string$content‪The parameter $content.
string | null$wrap‪The parameter $wrap.

Definition at line 550 of file ImageContentObjectTest.php.

References $GLOBALS.

◆ linkWrapDataProvider()

array TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::linkWrapDataProvider ( )

Data provider for linkWrap

Returns
‪array [[$expected, $content, $wrap],]

Definition at line 494 of file ImageContentObjectTest.php.

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

◆ setUp()

TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::setUp ( )
protected

Set up

Definition at line 42 of file ImageContentObjectTest.php.

References $GLOBALS.

Member Data Documentation

◆ $resetSingletonInstances

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

Reset singletons created by subject

Definition at line 33 of file ImageContentObjectTest.php.

◆ $subject