Skip to content
Snippets Groups Projects
Commit 6fa5cef8 authored by Nicole Cordes's avatar Nicole Cordes Committed by Christian Kuhn
Browse files

[BUGFIX] Failing unit test in SqlSchemaMigrationServiceTest

Currently the test for handling multiple white spaces within the sql
field definitions fails on Windows systems because of a different key
for the table name within the expected and actual array. This is caused
by a strict lowercase converting in the code for Windows systems. As the
table name is irrelevant for the test itself, this patch simply converts
table name to lower case.

Releases: master, 6.2
Resolves: #64657
Change-Id: I8d083e988b9a7403f0ff514af1ebe54adf065383
Reviewed-on: http://review.typo3.org/36459


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 49ca5387
No related merge requests found
......@@ -29,11 +29,11 @@ class SqlSchemaMigrationServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
public function getFieldDefinitionsFileContentHandlesMultipleWhitespacesInFieldDefinitions() {
$subject = new SqlSchemaMigrationService();
// Multiple whitespaces and tabs in field definition
$inputString = 'CREATE table aTable (' . LF . 'aFieldName int(11)' . TAB . TAB . TAB . 'unsigned DEFAULT \'0\'' . LF . ');';
$inputString = 'CREATE table atable (' . LF . 'aFieldName int(11)' . TAB . TAB . TAB . 'unsigned DEFAULT \'0\'' . LF . ');';
$result = $subject->getFieldDefinitions_fileContent($inputString);
$this->assertEquals(
array(
'aTable' => array(
'atable' => array(
'fields' => array(
'aFieldName' => 'int(11) unsigned default \'0\'',
),
......
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