Skip to content

Commit

Permalink
Fix SQLServer tests and add missing coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 10, 2017
1 parent 9102690 commit 248ad97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Database/Schema/SqlserverSchema.php
Expand Up @@ -89,7 +89,7 @@ protected function _convertColumn($col, $length = null, $precision = null, $scal
}

if ($col === 'tinyint') {
return ['type' => 'smallint', 'length' => $precision ?: 3];
return ['type' => 'tinyint', 'length' => $precision ?: 3];
}
if ($col === 'smallint') {
return ['type' => 'smallint', 'length' => $precision ?: 5];
Expand Down
22 changes: 18 additions & 4 deletions tests/TestCase/Database/Schema/SqlserverSchemaTest.php
Expand Up @@ -112,16 +112,30 @@ public static function convertColumnProvider()
[
'TINYINT',
null,
4,
2,
null,
['type' => 'tinyint', 'length' => 4]
['type' => 'tinyint', 'length' => 2]
],
[
'TINYINT',
null,
null,
null,
['type' => 'tinyint', 'length' => 3]
],
[
'SMALLINT',
null,
4,
3,
null,
['type' => 'smallint', 'length' => 3]
],
[
'SMALLINT',
null,
null,
null,
['type' => 'smallint', 'length' => 4]
['type' => 'smallint', 'length' => 5]
],
[
'INTEGER',
Expand Down

0 comments on commit 248ad97

Please sign in to comment.