[BUGFIX] Follow-Up to #41828 - Incomplete mocking in tests
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 19 Oct 2012 12:09:56 +0000 (14:09 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 19 Oct 2012 12:17:35 +0000 (14:17 +0200)
Better mocking in test class to ensure isUsageEnabled() returns TRUE
in all environments and especially in travis.

Change-Id: Icb68b1c863c13db0fb1e48390db130f43b9e0622
Related: #41828
Releases: 6.0
Reviewed-on: http://review.typo3.org/15815
Reviewed-by: Steffen Ritter
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/saltedpasswords/Tests/Unit/Evaluation/EvaluatorTest.php

index 1f4be49..53eab1c 100644 (file)
@@ -50,7 +50,10 @@ class EvaluatorTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        public function setUp() {
                $this->fixture = $this->getMock('TYPO3\\CMS\\Saltedpasswords\\Evaluation\\Evaluator', array('dummy'));
+
+               // Make sure SaltedPasswordsUtility::isUsageEnabled() returns TRUE
                unset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['saltedpasswords']);
+               $GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'] = 'rsa';
        }
 
        /**