TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ConditionMatcherTest Class Reference
Inheritance diagram for ConditionMatcherTest:

Public Member Functions

 simulateDisabledMatchAllConditionsFailsOnFaultyExpression ()
 
 simulateEnabledMatchAllConditionsSucceeds ()
 
 simulateEnabledMatchSpecificConditionsSucceeds ()
 
 conditionMatchesInternetExplorer7Windows ()
 
 conditionDoesNotMatchInternetExplorer7Windows ()
 
 conditionDoesMatchIosWithCorrectSystemKey ()
 
 conditionDoesMatchIosWithOldSystemKey ()
 
 conditionDoesMatchWindows2kWithNewSystemKey ()
 
 conditionDoesMatchWindows2kWithOldSystemKey ()
 
 conditionDoesMatchWindowsNtWithSystemKey ()
 
 conditionDoesMatchAndroidWithNewSystemKey ()
 
 conditionDoesMatchAndroidWithOldSystemKey ()
 
 deviceConditionMatchesRobot ()
 
 deviceConditionDoesNotMatchRobot ()
 
 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 Attributes

 $testGlobalNamespace
 
 $matchCondition
 

Detailed Description

Test case

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

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 715 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 693 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 704 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

conditionDoesMatchAndroidWithNewSystemKey ( )

Tests whether a condition does match Android with the correct and more recent 'android'

Test:

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

conditionDoesMatchAndroidWithOldSystemKey ( )

Tests whether a condition does match Android with the old 'linux'

Test:

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

conditionDoesMatchIosWithCorrectSystemKey ( )

Tests whether a condition does match the iOS with the correct and more recent 'iOS'

Test:

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

conditionDoesMatchIosWithOldSystemKey ( )

Tests whether a condition does match the iOS with the old 'mac'

Test:

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

conditionDoesMatchWindows2kWithNewSystemKey ( )

Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k'

Test:

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

conditionDoesMatchWindows2kWithOldSystemKey ( )

Tests whether a condition does match Windows 2000 with the old 'winNT'

Test:

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

conditionDoesMatchWindowsNtWithSystemKey ( )

Tests whether a condition does match Windows NT with 'winNT'

Test:

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

conditionDoesNotMatchInternetExplorer7Windows ( )

Tests whether a condition does not match Internet Explorer 7 on Windows.

Returns
void
Test:

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

conditionMatchesInternetExplorer7Windows ( )

Tests whether a condition matches Internet Explorer 7 on Windows.

Returns
void
Test:

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

deviceConditionDoesNotMatchRobot ( )

Tests whether a device type condition does not match a crawler.

Test:

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

deviceConditionMatchesRobot ( )

Tests whether a device type condition matches a crawler.

Test:

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

genericGetVariablesSucceedsWithNamespaceGP ( )

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

Test:

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

References $GLOBALS.

globalStringConditionMatchesEmptyRegularExpression ( )

Tests whether string comparison matches.

Test:

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

globalStringConditionMatchesOnEmptyExpressionWithValueSetToEmptyString ( )

Tests whether string comparison matches.

Test:

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

globalStringConditionMatchesOnEmptyLiteralExpressionWithValueSetToEmptyString ( )

Tests whether string comparison matches.

Test:

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

globalStringConditionMatchesOnEqualExpression ( )

Tests whether string comparison matches.

Test:

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

globalStringConditionMatchesRegularExpression ( )

Tests whether string comparison matches.

Test:

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

globalStringConditionMatchesWildcardExpression ( )

Tests whether string comparison matches.

Test:

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

globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionDoesNotMatchOnNotEqualExpression ( )

Tests whether numerical comparison does not match.

Test:

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

globalVarConditionMatchesOnEmptyExpressionWithNoValueSet ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnEqualExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnGreaterThanExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnGreaterThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnLowerThanExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnLowerThanOrEqualExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnNotEqualExpression ( )

Tests whether numerical comparison matches.

Test:

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

globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues ( )

Tests whether numerical comparison matches.

Test:

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

languageConditionMatchesCompleteLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

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

languageConditionMatchesMultipleLanguagesExpression ( )

Tests whether the language comparison matches.

Test:

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

languageConditionMatchesSingleLanguageExpression ( )

Tests whether the language comparison matches.

Test:

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

loginUserConditionDoesNotMatchIfNotUserIsLoggedId ( )

Tests whether user comparison matches.

Test:

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

References $GLOBALS.

loginUserConditionMatchesAnyLoggedInUser ( )

Tests whether user comparison matches.

Test:

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

References $GLOBALS.

loginUserConditionMatchesMultipleLoggedInUsers ( )

Tests whether user comparison matches.

Test:

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

References $GLOBALS.

loginUserConditionMatchesSingleLoggedInUser ( )

Tests whether user comparison matches.

Test:

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

References $GLOBALS.

loginUserConditionMatchIfUserIsNotLoggedIn ( )

Tests whether user is not logged in

Test:

Definition at line 341 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 681 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 670 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 659 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 648 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 637 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 626 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 615 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 604 of file frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php.

References $GLOBALS.

setUp ( )
protected
simulateDisabledMatchAllConditionsFailsOnFaultyExpression ( )

Tests whether a faulty expression fails.

Test:

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

simulateEnabledMatchAllConditionsSucceeds ( )

Tests whether simulating positive matches for all conditions succeeds.

Test:

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

simulateEnabledMatchSpecificConditionsSucceeds ( )

Tests whether simulating positive matches for specific conditions succeeds.

Test:

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

treeLevelConditionDoesNotMatchFaultyValue ( )

Tests whether treeLevel comparison matches.

Test:

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

treeLevelConditionMatchesMultipleValues ( )

Tests whether treeLevel comparison matches.

Test:

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

treeLevelConditionMatchesSingleValue ( )

Tests whether treeLevel comparison matches.

Test:

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

usergroupConditionDoesNotMatchDefaulUserGroupIds ( )

Tests whether usergroup comparison matches.

Test:

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

References $GLOBALS.

usergroupConditionMatchesMultipleUserGroupId ( )

Tests whether usergroup comparison matches.

Test:

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

References $GLOBALS.

usergroupConditionMatchesSingleGroupId ( )

Tests whether usergroup comparison matches.

Test:

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

References $GLOBALS.

Member Data Documentation

$matchCondition
protected
$testGlobalNamespace
protected