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

Public Member Functions

 getPluginNamespaceDataProvider ()
 
 getPluginNamespaceTests ($extensionName, $pluginName, $expectedResult)
 
 pluginNamespaceCanBeOverridden ()
 
 getPluginNameByActionDataProvider ()
 
 getPluginNameByActionTests ($extensionName, $controllerName, $actionName, $expectedResult)
 
 getPluginNameByActionThrowsExceptionIfMoreThanOnePluginMatches ()
 
 getPluginNameByActionReturnsCurrentIfItCanHandleTheActionEvenIfMoreThanOnePluginMatches ()
 
 isActionCacheableReturnsTrueByDefault ()
 
 isActionCacheableReturnsFalseIfActionIsNotCacheable ()
 
 getTargetPidByPluginSignatureReturnsNullIfConfigurationManagerIsNotInitialized ()
 
 getTargetPidByPluginSignatureReturnsNullIfDefaultPidIsZero ()
 
 getTargetPidByPluginSignatureReturnsTheConfiguredDefaultPid ()
 
 getTargetPidByPluginSignatureDeterminesTheTargetPidIfDefaultPidIsAuto ()
 
 getTargetPidByPluginSignatureReturnsNullIfTargetPidCouldNotBeDetermined ()
 
 getTargetPidByPluginSignatureThrowsExceptionIfMoreThanOneTargetPidsWereFound ()
 
 getDefaultControllerNameByPluginReturnsNullIfGivenExtensionCantBeFound ()
 
 getDefaultControllerNameByPluginReturnsNullIfGivenPluginCantBeFound ()
 
 getDefaultControllerNameByPluginReturnsFirstControllerNameOfGivenPlugin ()
 
 getDefaultActionNameByPluginAndControllerReturnsNullIfGivenExtensionCantBeFound ()
 
 getDefaultActionNameByPluginAndControllerReturnsNullIfGivenPluginCantBeFound ()
 
 getDefaultActionNameByPluginAndControllerReturnsNullIfGivenControllerCantBeFound ()
 
 getDefaultActionNameByPluginAndControllerReturnsFirstActionNameOfGivenController ()
 

Protected Member Functions

 setUp ()
 
 getMockDatabaseConnection ()
 
- 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

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

Detailed Description

Test case

Definition at line 30 of file ExtensionServiceTest.php.

Member Function Documentation

getDefaultActionNameByPluginAndControllerReturnsFirstActionNameOfGivenController ( )
Test:

Definition at line 392 of file ExtensionServiceTest.php.

getDefaultActionNameByPluginAndControllerReturnsNullIfGivenControllerCantBeFound ( )
Test:

Definition at line 384 of file ExtensionServiceTest.php.

getDefaultActionNameByPluginAndControllerReturnsNullIfGivenExtensionCantBeFound ( )
Test:

Definition at line 368 of file ExtensionServiceTest.php.

getDefaultActionNameByPluginAndControllerReturnsNullIfGivenPluginCantBeFound ( )
Test:

Definition at line 376 of file ExtensionServiceTest.php.

getDefaultControllerNameByPluginReturnsFirstControllerNameOfGivenPlugin ( )
Test:

Definition at line 358 of file ExtensionServiceTest.php.

getDefaultControllerNameByPluginReturnsNullIfGivenExtensionCantBeFound ( )
Test:

Definition at line 342 of file ExtensionServiceTest.php.

getDefaultControllerNameByPluginReturnsNullIfGivenPluginCantBeFound ( )
Test:

Definition at line 350 of file ExtensionServiceTest.php.

getPluginNameByActionDataProvider ( )

DataProvider for getPluginNameByActionTests()

Returns
array

Definition at line 156 of file ExtensionServiceTest.php.

getPluginNameByActionReturnsCurrentIfItCanHandleTheActionEvenIfMoreThanOnePluginMatches ( )
Test:

Definition at line 197 of file ExtensionServiceTest.php.

getPluginNameByActionTests (   $extensionName,
  $controllerName,
  $actionName,
  $expectedResult 
)
Test:
getPluginNameByActionDataProvider
Parameters
string$extensionName
string$controllerName
string$actionName
mixed$expectedResult

Definition at line 176 of file ExtensionServiceTest.php.

getPluginNameByActionThrowsExceptionIfMoreThanOnePluginMatches ( )
Test:

Definition at line 186 of file ExtensionServiceTest.php.

getPluginNamespaceDataProvider ( )

DataProvider for getPluginNamespaceByPluginSignatureTests()

Returns
array

Definition at line 117 of file ExtensionServiceTest.php.

getPluginNamespaceTests (   $extensionName,
  $pluginName,
  $expectedResult 
)
Test:
getPluginNamespaceDataProvider
Parameters
string$extensionName
string$pluginName
mixed$expectedResult

Definition at line 133 of file ExtensionServiceTest.php.

getTargetPidByPluginSignatureDeterminesTheTargetPidIfDefaultPidIsAuto ( )
Test:
Todo:
This should rather be a functional test since it needs a connection / querybuilder

Definition at line 266 of file ExtensionServiceTest.php.

References ExtensionServiceTest\getMockDatabaseConnection().

getTargetPidByPluginSignatureReturnsNullIfConfigurationManagerIsNotInitialized ( )
Test:

Definition at line 236 of file ExtensionServiceTest.php.

getTargetPidByPluginSignatureReturnsNullIfDefaultPidIsZero ( )
Test:

Definition at line 245 of file ExtensionServiceTest.php.

getTargetPidByPluginSignatureReturnsNullIfTargetPidCouldNotBeDetermined ( )
Test:
Todo:
This should rather be a functional test since it needs a connection / querybuilder

Definition at line 291 of file ExtensionServiceTest.php.

References ExtensionServiceTest\getMockDatabaseConnection().

getTargetPidByPluginSignatureReturnsTheConfiguredDefaultPid ( )
Test:

Definition at line 254 of file ExtensionServiceTest.php.

getTargetPidByPluginSignatureThrowsExceptionIfMoreThanOneTargetPidsWereFound ( )
Test:
Todo:
This should rather be a functional test since it needs a connection / querybuilder

Definition at line 314 of file ExtensionServiceTest.php.

References ExtensionServiceTest\getMockDatabaseConnection().

isActionCacheableReturnsFalseIfActionIsNotCacheable ( )
Test:

Definition at line 219 of file ExtensionServiceTest.php.

isActionCacheableReturnsTrueByDefault ( )
Test:

Definition at line 208 of file ExtensionServiceTest.php.

pluginNamespaceCanBeOverridden ( )
Test:

Definition at line 143 of file ExtensionServiceTest.php.

setUp ( )
protected

Definition at line 42 of file ExtensionServiceTest.php.

References $GLOBALS, and BaseTestCase\getAccessibleMock().

Member Data Documentation

$extensionService
protected

Definition at line 40 of file ExtensionServiceTest.php.

$mockConfigurationManager
protected

Definition at line 35 of file ExtensionServiceTest.php.