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

Public Member Functions

 isLoadedReturnsFalseIfExtensionIsNotLoadedAndExitIsDisabled ()
 
 isLoadedThrowsExceptionIfExtensionIsNotLoaded ()
 
 extensionKeyDataProvider ()
 
 getClassNamePrefixForExtensionKey ($extensionName, $expectedPrefix)
 
 getExtensionKeyByPrefixForNotLoadedExtensionReturnsFalse ()
 
 canAddFieldsToAllTCATypesBeforeExistingOnes ()
 
 canAddFieldsToAllTCATypesAfterExistingOnes ()
 
 canAddFieldsToAllTCATypesRespectsPalettes ()
 
 canAddFieldsToAllTCATypesRespectsPositionFieldInPalette ()
 
 canAddFieldsToTCATypeBeforeExistingOnes ()
 
 canAddFieldsToTCATypeAfterExistingOnes ()
 
 canAddFieldWithPartOfAlreadyExistingFieldname ()
 
 canAddFieldsToTCATypeAndReplaceExistingOnes ()
 
 addToAllTCAtypesReplacesExistingOnes ()
 
 canAddFieldsToPaletteBeforeExistingOnes ()
 
 canAddFieldsToPaletteAfterExistingOnes ()
 
 canAddFieldsToPaletteAfterNotExistingOnes ()
 
 removeDuplicatesForInsertionRemovesDuplicatesDataProvider ()
 
 removeDuplicatesForInsertionRemovesDuplicates ($insertionList, $list, $expected)
 
 addFieldsToAllPalettesOfFieldDoesNotAddAnythingIfFieldIsNotRegisteredInColumns ()
 
 addFieldsToAllPalettesOfFieldAddsFieldsToPaletteAndSuppressesDuplicates ()
 
 addFieldsToAllPalettesOfFieldDoesNotAddAFieldThatIsPartOfPaletteAlready ()
 
 addFieldsToAllPalettesOfFieldAddsFieldsToMultiplePalettes ()
 
 addFieldsToAllPalettesOfFieldAddsMultipleFields ()
 
 addFieldsToAllPalettesOfFieldAddsBeforeExistingIfRequested ()
 
 addFieldsToAllPalettesOfFieldAddsFieldsAtEndIfBeforeRequestedDoesNotExist ()
 
 addFieldsToAllPalettesOfFieldAddsAfterExistingIfRequested ()
 
 addFieldsToAllPalettesOfFieldAddsFieldsAtEndIfAfterRequestedDoesNotExist ()
 
 addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYet ()
 
 addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYetAndKeepsExistingLabel ()
 
 executePositionedStringInsertionTrimsCorrectCharactersDataProvider ()
 
 executePositionedStringInsertionTrimsCorrectCharacters ($string, $expectedResult)
 
 addTcaSelectItemThrowsExceptionIfTableIsNotOfTypeString ()
 
 addTcaSelectItemThrowsExceptionIfFieldIsNotOfTypeString ()
 
 addTcaSelectItemThrowsExceptionIfRelativeToFieldIsNotOfTypeString ()
 
 addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOfTypeString ()
 
 addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOneOfValidKeywords ()
 
 addTcaSelectItemThrowsExceptionIfFieldIsNotFoundInTca ()
 
 addTcaSelectItemDataProvider ()
 
 addTcaSelectItemInsertsItemAtSpecifiedPosition ($relativeToField, $relativePosition, $expectedResultArray)
 
 loadSingleExtLocalconfFilesRequiresExtLocalconfFileRegisteredInGlobalTypo3LoadedExt ()
 
 addModulePositionTestsDataProvider ()
 
 addModuleCanAddModule ($position, $existing, $expected)
 
 getExtLocalconfCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ()
 
 getBaseTcaCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ()
 
 getExtTablesCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ()
 
 getExtensionVersionFaultyDataProvider ()
 
 getExtensionVersionForFaultyExtensionKeyThrowsException ($key)
 
 getExtensionVersionForNotLoadedExtensionReturnsEmptyString ()
 
 loadExtensionThrowsExceptionIfExtensionIsLoaded ()
 
 addPluginSetsTcaCorrectlyForGivenExtKeyAsParameter ()
 
 addPluginSetsTcaCorrectlyForGivenExtKeyAsGlobal ()
 
 addPluginThrowsExceptionForMissingExtkey ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
 createMockPackageManagerWithMockPackage ($packageKey, $packageMethods=['getPackagePath', 'getPackageKey'])
 
- 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

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

Private Member Functions

 generateTCAForTable ($table)
 

Detailed Description

Test case

Definition at line 32 of file ExtensionManagementUtilityTest.php.

Member Function Documentation

addFieldsToAllPalettesOfFieldAddsAfterExistingIfRequested ( )
addFieldsToAllPalettesOfFieldAddsBeforeExistingIfRequested ( )
addFieldsToAllPalettesOfFieldAddsFieldsAtEndIfAfterRequestedDoesNotExist ( )
addFieldsToAllPalettesOfFieldAddsFieldsAtEndIfBeforeRequestedDoesNotExist ( )
addFieldsToAllPalettesOfFieldAddsFieldsToMultiplePalettes ( )
addFieldsToAllPalettesOfFieldAddsFieldsToPaletteAndSuppressesDuplicates ( )
addFieldsToAllPalettesOfFieldAddsMultipleFields ( )
addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYet ( )
addFieldsToAllPalettesOfFieldAddsNewPaletteIfFieldHasNoPaletteYetAndKeepsExistingLabel ( )
addFieldsToAllPalettesOfFieldDoesNotAddAFieldThatIsPartOfPaletteAlready ( )
addFieldsToAllPalettesOfFieldDoesNotAddAnythingIfFieldIsNotRegisteredInColumns ( )
addModuleCanAddModule (   $position,
  $existing,
  $expected 
)
Test:
addModulePositionTestsDataProvider
Parameters
$position
$existing
$expected

Definition at line 1384 of file ExtensionManagementUtilityTest.php.

References $GLOBALS, and ExtensionManagementUtility\addModule().

addModulePositionTestsDataProvider ( )

Data provider for addModule tests

Returns
array

Definition at line 1331 of file ExtensionManagementUtilityTest.php.

addPluginSetsTcaCorrectlyForGivenExtKeyAsGlobal ( )
Test:

Definition at line 1939 of file ExtensionManagementUtilityTest.php.

addPluginSetsTcaCorrectlyForGivenExtKeyAsParameter ( )
Test:

Definition at line 1919 of file ExtensionManagementUtilityTest.php.

addPluginThrowsExceptionForMissingExtkey ( )
Test:

Definition at line 1961 of file ExtensionManagementUtilityTest.php.

addTcaSelectItemDataProvider ( )

Data provider for addTcaSelectItemInsertsItemAtSpecifiedPosition

Definition at line 1178 of file ExtensionManagementUtilityTest.php.

addTcaSelectItemInsertsItemAtSpecifiedPosition (   $relativeToField,
  $relativePosition,
  $expectedResultArray 
)
Test:
addTcaSelectItemDataProvider
Parameters
$relativeToField
$relativePosition
$expectedResultArray

Definition at line 1244 of file ExtensionManagementUtilityTest.php.

References $GLOBALS, and ExtensionManagementUtility\addTcaSelectItem().

addTcaSelectItemThrowsExceptionIfFieldIsNotFoundInTca ( )
addTcaSelectItemThrowsExceptionIfFieldIsNotOfTypeString ( )
addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOfTypeString ( )
addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOneOfValidKeywords ( )
addTcaSelectItemThrowsExceptionIfRelativeToFieldIsNotOfTypeString ( )
addTcaSelectItemThrowsExceptionIfTableIsNotOfTypeString ( )
canAddFieldsToAllTCATypesAfterExistingOnes ( )
canAddFieldsToAllTCATypesBeforeExistingOnes ( )
canAddFieldsToAllTCATypesRespectsPalettes ( )
canAddFieldsToAllTCATypesRespectsPositionFieldInPalette ( )
canAddFieldsToPaletteAfterExistingOnes ( )
canAddFieldsToPaletteAfterNotExistingOnes ( )
canAddFieldsToPaletteBeforeExistingOnes ( )
canAddFieldsToTCATypeAfterExistingOnes ( )
canAddFieldsToTCATypeAndReplaceExistingOnes ( )
canAddFieldsToTCATypeBeforeExistingOnes ( )
createMockPackageManagerWithMockPackage (   $packageKey,
  $packageMethods = ['getPackagePath',
'getPackageKey']   
)
protected
Parameters
string$packageKey
array$packageMethods
Returns
PackageManager|

Definition at line 66 of file ExtensionManagementUtilityTest.php.

References GeneralUtility\mkdir_deep().

Referenced by ExtensionManagementUtilityTest\loadSingleExtLocalconfFilesRequiresExtLocalconfFileRegisteredInGlobalTypo3LoadedExt().

executePositionedStringInsertionTrimsCorrectCharacters (   $string,
  $expectedResult 
)
Test:
executePositionedStringInsertionTrimsCorrectCharactersDataProvider
Parameters
$string
$expectedResult

Definition at line 1098 of file ExtensionManagementUtilityTest.php.

References BaseTestCase\getAccessibleMock().

executePositionedStringInsertionTrimsCorrectCharactersDataProvider ( )

Data provider for executePositionedStringInsertionTrimsCorrectCharacters

Returns
array

Definition at line 1062 of file ExtensionManagementUtilityTest.php.

extensionKeyDataProvider ( )

Data provider for getClassNamePrefixForExtensionKey.

Returns
array

Definition at line 210 of file ExtensionManagementUtilityTest.php.

getBaseTcaCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ( )
Test:

Definition at line 1588 of file ExtensionManagementUtilityTest.php.

getClassNamePrefixForExtensionKey (   $extensionName,
  $expectedPrefix 
)
Test:
Parameters
string$extensionName
string$expectedPrefixextensionKeyDataProvider

Definition at line 238 of file ExtensionManagementUtilityTest.php.

References ExtensionManagementUtility\getCN().

getExtensionVersionFaultyDataProvider ( )

Data provider for negative getExtensionVersion() tests.

Returns
array

Definition at line 1759 of file ExtensionManagementUtilityTest.php.

getExtensionVersionForFaultyExtensionKeyThrowsException (   $key)
Test:
getExtensionVersionFaultyDataProvider
Parameters
$key
Exceptions
TYPO3

Definition at line 1775 of file ExtensionManagementUtilityTest.php.

getExtensionVersionForNotLoadedExtensionReturnsEmptyString ( )
Test:

Definition at line 1786 of file ExtensionManagementUtilityTest.php.

getExtLocalconfCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ( )
getExtTablesCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix ( )
Test:

Definition at line 1725 of file ExtensionManagementUtilityTest.php.

isLoadedReturnsFalseIfExtensionIsNotLoadedAndExitIsDisabled ( )
isLoadedThrowsExceptionIfExtensionIsNotLoaded ( )
loadExtensionThrowsExceptionIfExtensionIsLoaded ( )
Test:

Definition at line 1823 of file ExtensionManagementUtilityTest.php.

removeDuplicatesForInsertionRemovesDuplicates (   $insertionList,
  $list,
  $expected 
)
Test:
removeDuplicatesForInsertionRemovesDuplicatesDataProvider
Parameters
$insertionList
$list
$expected

Definition at line 540 of file ExtensionManagementUtilityTest.php.

References ExtensionManagementUtilityAccessibleProxy\removeDuplicatesForInsertion().

removeDuplicatesForInsertionRemovesDuplicatesDataProvider ( )
Returns
array

Definition at line 512 of file ExtensionManagementUtilityTest.php.

Member Data Documentation

$backUpPackageManager
protected

Definition at line 42 of file ExtensionManagementUtilityTest.php.

$singletonInstances = []
protected

Definition at line 37 of file ExtensionManagementUtilityTest.php.