Skip to content
Snippets Groups Projects
Commit b0507e87 authored by Stephan Großberndt's avatar Stephan Großberndt Committed by Christian Kuhn
Browse files

[TASK] Add test for NULL fields when comparing SQL field definitions

Resolves: #64697
Releases: master, 6.2
Change-Id: I6d08445633af54d64f9176fc7b691e318d08d897
Reviewed-on: http://review.typo3.org/36529


Reviewed-by: default avatarRonny Vorpahl <vorpahl@artplan21.de>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 2136c54a
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,50 @@ class SqlSchemaMigrationServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
);
}
/**
* @test
*/
public function getDatabaseExtraFindsChangedFieldsIncludingNull() {
$subject = new SqlSchemaMigrationService();
$differenceArray = $subject->getDatabaseExtra(
array(
'tx_foo' => array(
'fields' => array(
'foo' => 'varchar(999) NULL'
)
)
),
array(
'tx_foo' => array(
'fields' => array(
'foo' => 'varchar(255) NULL'
)
)
)
);
$this->assertEquals(
$differenceArray,
array(
'extra' => array(),
'diff' => array(
'tx_foo' => array(
'fields' => array(
'foo' => 'varchar(999) NULL'
)
)
),
'diff_currentValues' => array(
'tx_foo' => array(
'fields' => array(
'foo' => 'varchar(255) NULL'
)
)
)
)
);
}
/**
* @test
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment