[BUGFIX] Add parameter types to database writes in functional tests 95/51395/3
authorManuel Selbach <manuel_selbach@yahoo.de>
Sun, 22 Jan 2017 06:11:12 +0000 (22:11 -0800)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 25 Jan 2017 23:39:36 +0000 (00:39 +0100)
When writing to database tables with BLOB type columns declare the field
type for the query parameters in functional tests. This is required for
databases that use a different encoding/transport protocol for BLOB
fields.

Resolves: #79453
Releases: master
Change-Id: I1371bb192abaec841be982a1b228cc6b7e6d1cbf
Reviewed-on: https://review.typo3.org/51395
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Manuel Selbach <manuel_selbach@yahoo.de>
Tested-by: Manuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php

index 645e9f4..c955e2c 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Core\Tests\Functional\Cache\Backend;
 
 use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
+use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 
 /**
@@ -131,6 +132,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] - 60,
                 'content' => 'myCachedContent',
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -155,6 +159,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] + 60,
                 'content' => 'myCachedContent',
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -179,6 +186,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] + 60,
                 'content' => gzcompress('myCachedContent'),
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -205,6 +215,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] + 60,
                 'content' => gzcompress(''),
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -245,6 +258,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] - 60,
                 'content' => 'myCachedContent',
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -269,6 +285,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] + 60,
                 'content' => 'myCachedContent',
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -307,6 +326,9 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 'identifier' => 'myIdentifier',
                 'expires' => $GLOBALS['EXEC_TIME'] + 60,
                 'content' => 'myCachedContent',
+            ],
+            [
+                'content' => Connection::PARAM_LOB
             ]
         );
 
@@ -332,7 +354,10 @@ class Typo3DatabaseBackendTest extends \TYPO3\CMS\Components\TestingFramework\Co
                 ['myIdentifier', $GLOBALS['EXEC_TIME'] + 60, 'myCachedContent'],
                 ['otherIdentifier', $GLOBALS['EXEC_TIME'] + 60, 'otherCachedContent'],
             ],
-            ['identifier', 'expires', 'content']
+            ['identifier', 'expires', 'content'],
+            [
+                'content' => Connection::PARAM_LOB
+            ]
         );
         $subject = new Typo3DatabaseBackend('Testing');
         $subject->setCache($frontendProphecy->reveal());