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

Public Member Functions

 differentSizesDataProvider ()
 
 getIconReturnsIconWithCorrectMarkupWrapperIfRegisteredIconIdentifierIsUsed ()
 
 getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed ()
 
 getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed ($size)
 
 getIconByIdentifierAndSizeAndWithOverlayReturnsIconWithCorrectOverlayMarkupIfRegisteredIconIdentifierIsUsed ($size)
 
 getIconReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed ()
 
 getIconByIdentifierAndSizeReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed ($size)
 
 getIconReturnsCorrectMarkupIfIconIsRegisteredAsSpinningIcon ()
 
 getIconByIdentifierAndSizeAndOverlayReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed ($size)
 
 getIconThrowsExceptionIfInvalidSizeIsGiven ()
 
 getIconForFileWithNoFileTypeReturnsDefaultFileIcon ()
 
 getIconForFileWithUnknownFileTypeReturnsDefaultFileIcon ()
 
 getIconForFileWithFileTypePdfReturnsPdfIcon ()
 
 getIconForFileWithFileTypePngReturnsPngIcon ()
 
 getIconForResourceReturnsCorrectMarkupForFileResources ()
 
 getIconForResourceWithFileWithoutExtensionTypeReturnsOtherIcon ()
 
 getIconForResourceWithUnknownFileTypeReturnsOtherIcon ()
 
 getIconForResourceWithPdfReturnsPdfIcon ()
 
 getIconForResourceWithMimeTypeApplicationPdfReturnsPdfIcon ()
 
 getIconForResourceWithCustomImageMimeTypeReturnsImageIcon ()
 
 getIconForResourceWithPngFileReturnsIcon ()
 
 getIconForResourceWithFolderReturnsFolderIcon ()
 
 getIconForResourceWithOpenFolderReturnsOpenFolderIcon ()
 
 getIconForResourceWithRootFolderReturnsRootFolderIcon ()
 
 getIconForResourceWithMountRootReturnsMountFolderIcon ()
 
 getIconForRecordWithNullTableReturnsMissingIcon ()
 
 getIconForRecordWithEmptyRecordReturnsNormalIcon ()
 
 getIconForRecordWithMockRecordReturnsNormalIcon ()
 
 getIconForRecordWithMockRecordOfTypePluginReturnsPluginIcon ()
 
 getIconForRecordWithMockRecordWithHiddenFlagReturnsNormalIconAndOverlay ()
 

Protected Member Functions

 setUp ()
 
 getTestSubjectFileObject ($extension, $mimeType= '')
 
 getTestSubjectFolderObject ($identifier)
 
- 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

 $subject = null
 
 $notRegisteredIconIdentifier = 'my-super-unregistered-identifier'
 
 $registeredIconIdentifier = 'actions-document-close'
 
 $registeredSpinningIconIdentifier = 'spinning-icon'
 
 $iconRegistryMock
 
 $mockRecord
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

TestCase for

Definition at line 26 of file IconFactoryTest.php.

Member Function Documentation

differentSizesDataProvider ( )

DataProvider for icon sizes

Returns
array

Definition at line 110 of file IconFactoryTest.php.

References Icon\SIZE_DEFAULT, Icon\SIZE_LARGE, and Icon\SIZE_SMALL.

getIconByIdentifierAndSizeAndOverlayReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed (   $size)
Test:
differentSizesDataProvider
Parameters
string$size

Definition at line 216 of file IconFactoryTest.php.

getIconByIdentifierAndSizeAndWithOverlayReturnsIconWithCorrectOverlayMarkupIfRegisteredIconIdentifierIsUsed (   $size)
Test:
differentSizesDataProvider

Definition at line 151 of file IconFactoryTest.php.

getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed (   $size)
Test:
differentSizesDataProvider

Definition at line 141 of file IconFactoryTest.php.

getIconByIdentifierAndSizeReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed (   $size)
Test:
differentSizesDataProvider

Definition at line 179 of file IconFactoryTest.php.

getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed ( )
Test:

Definition at line 131 of file IconFactoryTest.php.

getIconForFileWithFileTypePdfReturnsPdfIcon ( )

Tests the return of an icon for a file with extension pdf

Test:

Definition at line 262 of file IconFactoryTest.php.

getIconForFileWithFileTypePngReturnsPngIcon ( )

Tests the return of an icon for a file with extension png

Test:

Definition at line 273 of file IconFactoryTest.php.

getIconForFileWithNoFileTypeReturnsDefaultFileIcon ( )

Tests the return of an icon for a file without extension

Test:

Definition at line 240 of file IconFactoryTest.php.

getIconForFileWithUnknownFileTypeReturnsDefaultFileIcon ( )

Tests the return of an icon for an unknown file type

Test:

Definition at line 251 of file IconFactoryTest.php.

getIconForRecordWithEmptyRecordReturnsNormalIcon ( )

Tests the returns of tt_content + empty record

Test:

Definition at line 436 of file IconFactoryTest.php.

References $GLOBALS.

getIconForRecordWithMockRecordOfTypePluginReturnsPluginIcon ( )

Tests the returns of tt_content + mock record of type 'list' (aka plugin)

Test:

Definition at line 478 of file IconFactoryTest.php.

References $GLOBALS, and IconFactoryTest\$mockRecord.

getIconForRecordWithMockRecordReturnsNormalIcon ( )

Tests the returns of tt_content + mock record

Test:

Definition at line 457 of file IconFactoryTest.php.

References $GLOBALS.

getIconForRecordWithMockRecordWithHiddenFlagReturnsNormalIconAndOverlay ( )

Tests the returns of tt_content + mock record with hidden flag

Test:

Definition at line 501 of file IconFactoryTest.php.

References $GLOBALS, and IconFactoryTest\$mockRecord.

getIconForRecordWithNullTableReturnsMissingIcon ( )

Tests the returns of NULL table + empty array

Test:

Definition at line 425 of file IconFactoryTest.php.

getIconForResourceReturnsCorrectMarkupForFileResources ( )
Test:

Definition at line 282 of file IconFactoryTest.php.

getIconForResourceWithCustomImageMimeTypeReturnsImageIcon ( )

Tests the returns of file with custom image mime-type

Test:

Definition at line 349 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconForResourceWithFileWithoutExtensionTypeReturnsOtherIcon ( )

Tests the returns of no file

Test:

Definition at line 301 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconForResourceWithFolderReturnsFolderIcon ( )

Tests the returns of normal folder

Test:

Definition at line 373 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFolderObject().

getIconForResourceWithMimeTypeApplicationPdfReturnsPdfIcon ( )

Tests the returns of file pdf with known mime-type

Test:

Definition at line 337 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconForResourceWithMountRootReturnsMountFolderIcon ( )

Tests the returns of mount root

Test:

Definition at line 409 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFolderObject(), and Icon\SIZE_DEFAULT.

getIconForResourceWithOpenFolderReturnsOpenFolderIcon ( )

Tests the returns of open folder

Test:

Definition at line 385 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFolderObject(), and Icon\SIZE_DEFAULT.

getIconForResourceWithPdfReturnsPdfIcon ( )

Tests the returns of file pdf

Test:

Definition at line 325 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconForResourceWithPngFileReturnsIcon ( )

Tests the returns of file png

Test:

Definition at line 361 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconForResourceWithRootFolderReturnsRootFolderIcon ( )

Tests the returns of root folder

Test:

Definition at line 397 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFolderObject().

getIconForResourceWithUnknownFileTypeReturnsOtherIcon ( )

Tests the returns of unknown file

Test:

Definition at line 313 of file IconFactoryTest.php.

References IconFactoryTest\getTestSubjectFileObject().

getIconReturnsCorrectMarkupIfIconIsRegisteredAsSpinningIcon ( )
Test:

Definition at line 197 of file IconFactoryTest.php.

getIconReturnsIconWithCorrectMarkupWrapperIfRegisteredIconIdentifierIsUsed ( )
Test:

Definition at line 122 of file IconFactoryTest.php.

getIconReturnsNotFoundIconWithCorrectMarkupIfUnregisteredIdentifierIsUsed ( )
Test:

Definition at line 160 of file IconFactoryTest.php.

getIconThrowsExceptionIfInvalidSizeIsGiven ( )
Test:

Definition at line 225 of file IconFactoryTest.php.

setUp ( )
protected

Set up

Returns
void

Definition at line 80 of file IconFactoryTest.php.

Member Data Documentation

$iconRegistryMock
protected

Definition at line 51 of file IconFactoryTest.php.

$mockRecord
protected
$notRegisteredIconIdentifier = 'my-super-unregistered-identifier'
protected

Definition at line 36 of file IconFactoryTest.php.

$registeredIconIdentifier = 'actions-document-close'
protected

Definition at line 41 of file IconFactoryTest.php.

$registeredSpinningIconIdentifier = 'spinning-icon'
protected

Definition at line 46 of file IconFactoryTest.php.

$subject = null
protected

Definition at line 31 of file IconFactoryTest.php.