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 ()
 
 usergroupConditionDoesNotMatchDefaulUserGroupIds ()
 
 loginUserConditionMatchesAnyLoggedInUser ()
 
 loginUserConditionMatchesSingleLoggedInUser ()
 
 loginUserConditionMatchesMultipleLoggedInUsers ()
 
 loginUserConditionDoesNotMatchIfNotUserIsLoggedId ()
 
 loginUserConditionMatchIfUserIsNotLoggedIn ()
 
 globalVarConditionMatchesOnEqualExpression ()
 
 globalVarConditionMatchesOnEqualExpressionWithMultipleValues ()
 
 globalVarConditionMatchesOnNotEqualExpression ()
 
 globalVarConditionDoesNotMatchOnNotEqualExpression ()
 
 globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues ()
 
 globalVarConditionMatchesOnLowerThanExpression ()
 
 globalVarConditionMatchesOnLowerThanOrEqualExpression ()
 
 globalVarConditionMatchesOnGreaterThanExpression ()
 
 globalVarConditionMatchesOnGreaterThanOrEqualExpression ()
 
 globalVarConditionMatchesOnEmptyExpressionWithNoValueSet ()
 
 globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero ()
 
 globalVarConditionMatchesOnArrayExpressionWithZeroAsKey ()
 
 globalStringConditionMatchesOnEqualExpression ()
 
 globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString ()
 
 globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString ()
 
 globalStringConditionMatchesWildcardExpression ()
 
 globalStringConditionMatchesRegularExpression ()
 
 globalStringConditionMatchesEmptyRegularExpression ()
 
 treeLevelConditionMatchesSingleValue ()
 
 treeLevelConditionMatchesMultipleValues ()
 
 treeLevelConditionDoesNotMatchFaultyValue ()
 
 PIDupinRootlineConditionMatchesSinglePageIdInRootline ()
 
 PIDupinRootlineConditionMatchesMultiplePageIdsInRootline ()
 
 PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline ()
 
 PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline ()
 
 PIDinRootlineConditionMatchesSinglePageIdInRootline ()
 
 PIDinRootlineConditionMatchesMultiplePageIdsInRootline ()
 
 PIDinRootlineConditionMatchesLastPageIdInRootline ()
 
 PIDinRootlineConditionDoesNotMatchPageIdNotInRootline ()
 
 compatVersionConditionMatchesOlderRelease ()
 
 compatVersionConditionMatchesSameRelease ()
 
 compatVersionConditionDoesNotMatchNewerRelease ()
 
 genericGetVariablesSucceedsWithNamespaceGP ()
 
 genericGetVariablesSucceedsWithNamespaceTSFE ()
 
 genericGetVariablesSucceedsWithNamespaceENV ()
 
 genericGetVariablesSucceedsWithNamespaceIENV ()
 
 genericGetVariablesSucceedsWithAnyGlobalNamespace ()
 
 matchThrowsExceptionIfConditionClassDoesNotInheritFromAbstractCondition ()
 
 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

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

Detailed Description

Member Function Documentation

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 583 of file frontend/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 561 of file frontend/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 572 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

genericGetVariablesSucceedsWithAnyGlobalNamespace ( )

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

Test:

Definition at line 643 of file frontend/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 620 of file frontend/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 593 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

genericGetVariablesSucceedsWithNamespaceIENV ( )

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

Test:

Definition at line 632 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References GeneralUtility\getIndpEnv().

genericGetVariablesSucceedsWithNamespaceTSFE ( )

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

Test:

Definition at line 606 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

globalStringConditionMatchesEmptyRegularExpression ( )
globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString ( )
globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString ( )

Tests whether string comparison matches.

Test:

Definition at line 395 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesOnEqualExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 370 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesRegularExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 418 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalStringConditionMatchesWildcardExpression ( )

Tests whether string comparison matches.

Test:

Definition at line 406 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero ( )

Tests whether numerical comparison matches.

Test:

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

References BaseTestCase\getUniqueId().

globalVarConditionDoesNotMatchOnNotEqualExpression ( )

Tests whether numerical comparison does not match.

Test:

Definition at line 261 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnArrayExpressionWithZeroAsKey ( )

Tests whether an array with zero as key matches its value

Test:

Definition at line 356 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

globalVarConditionMatchesOnEmptyExpressionWithNoValueSet ( )

Tests whether numerical comparison matches.

Test:

Definition at line 330 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

globalVarConditionMatchesOnEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 220 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnGreaterThanExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 306 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnGreaterThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 317 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnLowerThanExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnLowerThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 293 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnNotEqualExpression ( )

Tests whether numerical comparison matches.

Test:

Definition at line 250 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

Definition at line 271 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesCompleteLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 116 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesMultipleLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 104 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

languageConditionMatchesSingleLanguageExpression ( )

Tests whether the language comparison matches.

Test:

Definition at line 92 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

loginUserConditionDoesNotMatchIfNotUserIsLoggedId ( )

Tests whether user comparison matches.

Test:

Definition at line 196 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesAnyLoggedInUser ( )

Tests whether user comparison matches.

Test:

Definition at line 160 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesMultipleLoggedInUsers ( )

Tests whether user comparison matches.

Test:

Definition at line 184 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchesSingleLoggedInUser ( )

Tests whether user comparison matches.

Test:

Definition at line 172 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

loginUserConditionMatchIfUserIsNotLoggedIn ( )

Tests whether user is not logged in

Test:

Definition at line 209 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

matchCallsTestConditionAndHandsOverParameters ( )
matchThrowsExceptionIfConditionClassDoesNotInheritFromAbstractCondition ( )
PIDinRootlineConditionDoesNotMatchPageIdNotInRootline ( )

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

Test:

Definition at line 549 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDinRootlineConditionMatchesLastPageIdInRootline ( )

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

Test:

Definition at line 538 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDinRootlineConditionMatchesMultiplePageIdsInRootline ( )

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

Test:

Definition at line 527 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDinRootlineConditionMatchesSinglePageIdInRootline ( )

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

Test:

Definition at line 516 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline ( )

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

Test:

Definition at line 505 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline ( )

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

Test:

Definition at line 494 of file frontend/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 483 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

PIDupinRootlineConditionMatchesSinglePageIdInRootline ( )

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

Test:

Definition at line 472 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

simulateDisabledMatchAllConditionsFailsOnFaultyExpression ( )

Tests whether a faulty expression fails.

Test:

Definition at line 58 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

simulateEnabledMatchAllConditionsSucceeds ( )

Tests whether simulating positive matches for all conditions succeeds.

Test:

Definition at line 69 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

simulateEnabledMatchSpecificConditionsSucceeds ( )

Tests whether simulating positive matches for specific conditions succeeds.

Test:

Definition at line 80 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References BaseTestCase\getUniqueId().

treeLevelConditionDoesNotMatchFaultyValue ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 462 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

treeLevelConditionMatchesMultipleValues ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 452 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

treeLevelConditionMatchesSingleValue ( )

Tests whether treeLevel comparison matches.

Test:

Definition at line 442 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

usergroupConditionDoesNotMatchDefaulUserGroupIds ( )

Tests whether usergroup comparison matches.

Test:

Definition at line 149 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

usergroupConditionMatchesMultipleUserGroupId ( )

Tests whether usergroup comparison matches.

Test:

Definition at line 138 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

usergroupConditionMatchesSingleGroupId ( )

Tests whether usergroup comparison matches.

Test:

Definition at line 127 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

Member Data Documentation