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

Public Member Functions

 simulateDisabledMatchAllConditionsFailsOnFaultyExpression ()
 
 simulateEnabledMatchAllConditionsSucceeds ()
 
 simulateEnabledMatchSpecificConditionsSucceeds ()
 
 languageConditionMatchesSingleLanguageExpression ()
 
 languageConditionMatchesMultipleLanguagesExpression ()
 
 languageConditionMatchesCompleteLanguagesExpression ()
 
 usergroupConditionMatchesSingleGroupId ()
 
 usergroupConditionMatchesMultipleUserGroupId ()
 
 loginUserConditionMatchesAnyLoggedInUser ()
 
 loginUserConditionMatchesSingleLoggedInUser ()
 
 loginUserConditionDoesNotMatchSingleLoggedInUser ()
 
 loginUserConditionMatchesMultipleLoggedInUsers ()
 
 adminUserConditionMatchesAdminUser ()
 
 adminUserConditionMatchesRegularUser ()
 
 adminUserConditionDoesNotMatchRegularUser ()
 
 globalVarConditionMatchesOnEqualExpression ()
 
 globalVarConditionMatchesOnEqualExpressionWithMultipleValues ()
 
 globalVarConditionMatchesOnNotEqualExpression ()
 
 globalVarConditionDoesNotMatchOnNotEqualExpression ()
 
 globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues ()
 
 globalVarConditionMatchesOnLowerThanExpression ()
 
 globalVarConditionMatchesOnLowerThanOrEqualExpression ()
 
 globalVarConditionMatchesOnGreaterThanExpression ()
 
 globalVarConditionMatchesOnGreaterThanOrEqualExpression ()
 
 globalVarConditionMatchesOnEmptyExpressionWithNoValueSet ()
 
 globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero ()
 
 globalStringConditionMatchesOnEqualExpression ()
 
 globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString ()
 
 globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString ()
 
 globalStringConditionMatchesWildcardExpression ()
 
 globalStringConditionMatchesRegularExpression ()
 
 globalStringConditionMatchesEmptyRegularExpression ()
 
 treeLevelConditionMatchesSingleValue ()
 
 treeLevelConditionMatchesMultipleValues ()
 
 treeLevelConditionDoesNotMatchFaultyValue ()
 
 treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage ()
 
 treeLevelConditionMatchesCurrentPageIdWhileSavingNewPage ()
 
 PIDupinRootlineConditionMatchesSinglePageIdInRootline ()
 
 PIDupinRootlineConditionMatchesMultiplePageIdsInRootline ()
 
 PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline ()
 
 PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline ()
 
 PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage ()
 
 PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage ()
 
 PIDinRootlineConditionMatchesSinglePageIdInRootline ()
 
 PIDinRootlineConditionMatchesMultiplePageIdsInRootline ()
 
 PIDinRootlineConditionMatchesLastPageIdInRootline ()
 
 PIDinRootlineConditionDoesNotMatchPageIdNotInRootline ()
 
 compatVersionConditionMatchesOlderRelease ()
 
 compatVersionConditionMatchesSameRelease ()
 
 compatVersionConditionDoesNotMatchNewerRelease ()
 
 genericGetVariablesSucceedsWithNamespaceGP ()
 
 genericGetVariablesFailsWithNamespaceTSFE ()
 
 genericGetVariablesSucceedsWithNamespaceENV ()
 
 genericGetVariablesSucceedsWithNamespaceIENV ()
 
 genericGetVariablesSucceedsWithAnyGlobalNamespace ()
 
 pageIdCanBeDeterminedWhileCallingModuleWithPageTree ()
 
 pageIdCanBeDeterminedWhileEditingAPageRecord ()
 
 pageIdCanBeDeterminedWhileEditingARegularRecord ()
 
 pageIdCanBeDeterminedWhileCreatingARecord ()
 
 pageIdCanBeDeterminedWhileCreatingARecordAfterAnExistingRecord ()
 
 pageIdCanBeDeterminedWhileDeletingAPageRecord ()
 
 pageIdCanBeDeterminedWhileCopyingARecordToAnotherPage ()
 
 pageIdCanBeDeterminedWhileCopyingARecordAfterAnExistingRecord ()
 
 pageIdCanBeDeterminedWhileMovingARecordToAnotherPage ()
 
 matchCallsTestConditionAndHandsOverParameters ()
 

Protected Member Functions

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

 $rootline
 
 $matchCondition
 
 $testGlobalNamespace
 
 $testTableName
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Private Member Functions

 setUpBackend ()
 
 setUpDatabaseMockForDeterminePageId ()
 

Detailed Description

Member Function Documentation

adminUserConditionDoesNotMatchRegularUser ( )

Tests whether checkinf for an admin user matches

Test:

Definition at line 257 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

adminUserConditionMatchesAdminUser ( )

Tests whether checkinf for an admin user matches

Test:

Definition at line 233 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

adminUserConditionMatchesRegularUser ( )

Tests whether checkinf for an admin user matches

Test:

Definition at line 245 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

compatVersionConditionDoesNotMatchNewerRelease ( )

Tests whether the compatibility version can be evaluated. (e.g. 7.9 is compatible to 7.0 but not to 15.0)

Test:

Definition at line 735 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

compatVersionConditionMatchesOlderRelease ( )

Tests whether the compatibility version can be evaluated. (e.g. 7.9 is compatible to 7.0 but not to 15.0)

Test:

Definition at line 713 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

compatVersionConditionMatchesSameRelease ( )

Tests whether the compatibility version can be evaluated. (e.g. 7.9 is compatible to 7.0 but not to 15.0)

Test:

Definition at line 724 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

genericGetVariablesFailsWithNamespaceTSFE ( )

Tests whether the generic fetching of variables does not work with the namespace 'TSFE', since we are in the backend context here.

Test:

Definition at line 759 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

genericGetVariablesSucceedsWithAnyGlobalNamespace ( )

Tests whether the generic fetching of variables works with any global namespace.

Test:

Definition at line 794 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS, and ConditionMatcherTest\$testGlobalNamespace.

genericGetVariablesSucceedsWithNamespaceENV ( )

Tests whether the generic fetching of variables works with the namespace 'ENV'.

Test:

Definition at line 771 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

genericGetVariablesSucceedsWithNamespaceGP ( )

Tests whether the generic fetching of variables works with the namespace 'GP'.

Test:

Definition at line 745 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

genericGetVariablesSucceedsWithNamespaceIENV ( )

Tests whether the generic fetching of variables works with the namespace 'IENV'.

Test:

Definition at line 783 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References GeneralUtility\getIndpEnv().

globalStringConditionMatchesEmptyRegularExpression ( )
globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString ( )
globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString ( )

Tests whether string comparison matches.

Test:

Definition at line 430 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesOnEqualExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 405 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesRegularExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 453 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesWildcardExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 441 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero ( )

Tests whether numerical comparison matches.

Test:

Definition at line 391 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

globalVarConditionDoesNotMatchOnNotEqualExpression ( )

Tests whether numerical comparison does not match.

Test:

Definition at line 310 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnEmptyExpressionWithNoValueSet ( )

Tests whether numerical comparison matches.

Test:

Definition at line 379 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

globalVarConditionMatchesOnEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 269 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

Definition at line 282 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnGreaterThanExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 355 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnGreaterThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 366 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnLowerThanExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 331 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnLowerThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 342 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnNotEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 299 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

Definition at line 320 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesCompleteLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 155 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesMultipleLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 143 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesSingleLanguageExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 131 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

loginUserConditionDoesNotMatchSingleLoggedInUser ( )

Tests whether user comparison matches.

Test:

Definition at line 211 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesAnyLoggedInUser ( )

Tests whether user comparison matches.

Test:

Definition at line 189 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesMultipleLoggedInUsers ( )

Tests whether user comparison matches.

Test:

Definition at line 222 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesSingleLoggedInUser ( )

Tests whether user comparison matches.

Test:

Definition at line 200 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

matchCallsTestConditionAndHandsOverParameters ( )
pageIdCanBeDeterminedWhileCallingModuleWithPageTree ( )

Tests whether determining a pageId works.

Test:

Definition at line 809 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

pageIdCanBeDeterminedWhileCopyingARecordAfterAnExistingRecord ( )
pageIdCanBeDeterminedWhileCopyingARecordToAnotherPage ( )

Tests whether determining a pageId works.

Test:

Definition at line 883 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

pageIdCanBeDeterminedWhileCreatingARecord ( )

Tests whether determining a pageId works.

Test:

Definition at line 846 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

pageIdCanBeDeterminedWhileCreatingARecordAfterAnExistingRecord ( )
pageIdCanBeDeterminedWhileDeletingAPageRecord ( )

Tests whether determining a pageId works.

Test:

Definition at line 871 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

pageIdCanBeDeterminedWhileEditingAPageRecord ( )

Tests whether determining a pageId works.

Test:

Definition at line 821 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

pageIdCanBeDeterminedWhileEditingARegularRecord ( )
pageIdCanBeDeterminedWhileMovingARecordToAnotherPage ( )

Tests whether determining a pageId works.

Test:

Definition at line 908 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDinRootlineConditionDoesNotMatchPageIdNotInRootline ( )

Tests whether a page Id is found in all rootline entries.

Test:

Definition at line 700 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDinRootlineConditionMatchesLastPageIdInRootline ( )

Tests whether a page Id is found in all rootline entries.

Test:

Definition at line 688 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDinRootlineConditionMatchesMultiplePageIdsInRootline ( )

Tests whether a page Id is found in all rootline entries.

Test:

Definition at line 676 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDinRootlineConditionMatchesSinglePageIdInRootline ( )

Tests whether a page Id is found in all rootline entries.

Test:

Definition at line 664 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

Definition at line 599 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

Definition at line 587 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

Definition at line 611 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

999 is the uid of the page that was just created

Definition at line 634 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDupinRootlineConditionMatchesMultiplePageIdsInRootline ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

Definition at line 575 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

PIDupinRootlineConditionMatchesSinglePageIdInRootline ( )

Tests whether a page Id is found in the previous rootline entries.

Test:

Definition at line 563 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

setUpBackend ( )
private
simulateDisabledMatchAllConditionsFailsOnFaultyExpression ( )

Tests whether a faulty expression fails.

Test:

Definition at line 98 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

simulateEnabledMatchAllConditionsSucceeds ( )

Tests whether simulating positive matches for all conditions succeeds.

Test:

Definition at line 108 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

simulateEnabledMatchSpecificConditionsSucceeds ( )

Tests whether simulating positive matches for specific conditions succeeds.

Test:

Definition at line 119 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

treeLevelConditionDoesNotMatchFaultyValue ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 499 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage ( )

Tests whether treeLevel comparison matches when creating new pages.

Test:

Definition at line 510 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

treeLevelConditionMatchesCurrentPageIdWhileSavingNewPage ( )

Tests whether treeLevel comparison matches when creating new pages.

Test:

999 is the uid of the page that was just created

Definition at line 533 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

treeLevelConditionMatchesMultipleValues ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 488 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

treeLevelConditionMatchesSingleValue ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 477 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

usergroupConditionMatchesMultipleUserGroupId ( )

Tests whether usergroup comparison matches.

Test:

Definition at line 178 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

usergroupConditionMatchesSingleGroupId ( )

Tests whether usergroup comparison matches.

Test:

Definition at line 167 of file backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

Member Data Documentation