Commit a70787f1 authored by Manuel Selbach's avatar Manuel Selbach Committed by Christian Kuhn
Browse files

[BUGFIX] Add parameter types to database writes in functional tests

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: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Manuel Selbach's avatarManuel Selbach <manuel_selbach@yahoo.de>
Tested-by: Manuel Selbach's avatarManuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent bbbf4c78
......@@ -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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment