[BUGFIX] Warning missing argument 3 in t3lib_cacheHashTest
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 14:38:52 +0000 (16:38 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 8 Sep 2012 14:41:16 +0000 (16:41 +0200)
t3lib_cacheHashTest::cacheHashCalculationWorks() expects three parameters
from the data provider, but the data provider delivers only two. The
third parameter is superfluous and removed with the patch.

Change-Id: I89a651b58522e394130438fe305796e280a947eb
Resolves: #40757
Releases: 6.0
Reviewed-on: http://review.typo3.org/14453
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
tests/Unit/t3lib/class.t3lib_cacheHashTest.php

index 194dc75..48efff6 100644 (file)
@@ -63,11 +63,11 @@ class t3lib_cacheHashTest extends tx_phpunit_testcase {
         * @dataProvider cacheHashCalculationDataprovider
         * @test
         */
-       public function cacheHashCalculationWorks($params, $expected, $message) {
+       public function cacheHashCalculationWorks($params, $expected) {
                if (!class_exists('t3lib_diff')) {
                        $this->markTestSkipped('The current version of phpunit relies on t3lib_diff which is removed in 6.0 and thus this test fails. Move t3lib_diff to phpunit and reenable this test.');
                }
-               $this->assertEquals($expected, $this->fixture->calculateCacheHash($params), $message);
+               $this->assertEquals($expected, $this->fixture->calculateCacheHash($params));
        }
 
        /**
@@ -75,13 +75,23 @@ class t3lib_cacheHashTest extends tx_phpunit_testcase {
         */
        public function cacheHashCalculationDataprovider() {
                return array(
-                       'Empty parameters should not return a hash' => array(array(), ''),
+                       'Empty parameters should not return a hash' => array(
+                               array(),
+                               ''
+                       ),
                        'Trivial key value combination should generate hash' => array(
-                               array('encryptionKey' => 't3lib_cacheHashTest', 'key' => 'value'),
+                               array(
+                                       'encryptionKey' => 't3lib_cacheHashTest',
+                                       'key' => 'value'
+                               ),
                                '5cfdcf826275558b3613dd51714a0a17'
                        ),
                        'Multiple parameters should generate hash' => array(
-                               array('a' => 'v', 'b' => 'v', 'encryptionKey' => 't3lib_cacheHashTest'),
+                               array(
+                                       'a' => 'v',
+                                       'b' => 'v',
+                                       'encryptionKey' => 't3lib_cacheHashTest'
+                               ),
                                '0f40b089cdad149aea99e9bf4badaa93'
                        )
                );