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

Public Member Functions

 getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFound (?string $key, ?array $configuration)
 
 getImageTagTemplateReturnTemplateElementIdentifiedByKey (string $key, array $configuration, string $expectation)
 
 getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefined (?string $layoutKey, ?array $configuration, ?string $file)
 
 getImageSourceCollectionRendersDefinedSources ()
 
 getImageSourceCollectionRendersDefinedLayoutKeyDefault (string $layoutKey, array $configuration)
 
 getImageSourceCollectionRendersDefinedLayoutKeyData (string $layoutKey, array $configuration, string $doctype, string $expectedHtml)
 
 modifyImageSourceCollectionEventIsCalled ()
 
 isGetOneSourceCollectionCalledCallback (array $sourceRenderConfiguration, array $sourceConfiguration)
 
 linkWrap (string $expected, string $content, $wrap)
 

Static Public Member Functions

static getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider ()
 
static getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider ()
 
static getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider ()
 
static array getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider ()
 
static array getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider ()
 
static array linkWrapDataProvider ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

bool $resetSingletonInstances = true
 
ImageContentObject &MockObject &AccessibleObjectInterface $subject
 

Detailed Description

Definition at line 46 of file ImageContentObjectTest.php.

Member Function Documentation

◆ getImageSourceCollectionRendersDefinedLayoutKeyData()

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

◆ getImageSourceCollectionRendersDefinedLayoutKeyDataDataProvider()

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

Data provider for the getImageSourceCollectionRendersDefinedLayoutKeyData test

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

Definition at line 269 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionRendersDefinedLayoutKeyDataDefaultProvider()

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

Data provider for the getImageSourceCollectionRendersDefinedLayoutKeyDefault test

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

Definition at line 202 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionRendersDefinedLayoutKeyDefault()

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

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

Definition at line 242 of file ImageContentObjectTest.php.

◆ 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

Definition at line 151 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefined()

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

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

Definition at line 138 of file ImageContentObjectTest.php.

◆ getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider()

static TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageSourceCollectionReturnsEmptyStringIfNoSourcesAreDefinedDataProvider ( )
static

Definition at line 125 of file ImageContentObjectTest.php.

◆ getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFound()

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

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

Definition at line 89 of file ImageContentObjectTest.php.

◆ getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider()

static TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateFallsBackToDefaultTemplateIfNoTemplateIsFoundDataProvider ( )
static

Definition at line 74 of file ImageContentObjectTest.php.

◆ getImageTagTemplateReturnTemplateElementIdentifiedByKey()

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

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

Definition at line 119 of file ImageContentObjectTest.php.

◆ getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider()

static TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::getImageTagTemplateReturnTemplateElementIdentifiedByKeyDataProvider ( )
static

Definition at line 96 of file ImageContentObjectTest.php.

◆ isGetOneSourceCollectionCalledCallback()

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

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

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.

Parameters
string$expected‪The expected output.
string$content‪The parameter $content.
string | null$wrap‪The parameter $wrap.

Definition at line 543 of file ImageContentObjectTest.php.

◆ linkWrapDataProvider()

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

Data provider for linkWrap

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

Definition at line 492 of file ImageContentObjectTest.php.

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

◆ modifyImageSourceCollectionEventIsCalled()

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

◆ setUp()

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

Definition at line 52 of file ImageContentObjectTest.php.

References $GLOBALS.

Member Data Documentation

◆ $resetSingletonInstances

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

Definition at line 48 of file ImageContentObjectTest.php.

◆ $subject

ImageContentObject& MockObject& AccessibleObjectInterface TYPO3\CMS\Frontend\Tests\Unit\ContentObject\ImageContentObjectTest::$subject
protected