fix some tests

This commit is contained in:
v-kaywon 2018-03-05 15:32:08 -08:00
parent 85871448bc
commit 7870d88245
2 changed files with 4 additions and 3 deletions

View file

@ -88,6 +88,7 @@ try {
echo "****Conversion from $pdoParamType to $dataType is supported****\n"; echo "****Conversion from $pdoParamType to $dataType is supported****\n";
} else { } else {
echo "Conversion from $pdoParamType to $dataType causes data corruption\n"; echo "Conversion from $pdoParamType to $dataType causes data corruption\n";
var_dump($row);
} }
} }
} }

View file

@ -56,13 +56,13 @@ foreach($dataTypes as $dataType) {
$inputValues[1] = $inputValuesInit[$dataType][1]; $inputValues[1] = $inputValuesInit[$dataType][1];
if ($m != 0) { if ($m != 0) {
if ($dataType == "datetime2") { if ($dataType == "datetime2") {
$inputValues[1] .= "." . str_repeat("9", $m); $inputValues[1] .= "." . str_repeat("4", $m);
} else if ($dataType == "datetimeoffset") { } else if ($dataType == "datetimeoffset") {
$dtoffsetPieces = explode(" ", $inputValues[1]); $dtoffsetPieces = explode(" ", $inputValues[1]);
$inputValues[1] = $dtoffsetPieces[0] . " " . $dtoffsetPieces[1] . "." . str_repeat("9", $m) . " " . $dtoffsetPieces[2]; $inputValues[1] = $dtoffsetPieces[0] . " " . $dtoffsetPieces[1] . "." . str_repeat("4", $m) . " " . $dtoffsetPieces[2];
} else if ($dataType == "time") { } else if ($dataType == "time") {
$inputValues[0] .= "." . str_repeat("0", $m); $inputValues[0] .= "." . str_repeat("0", $m);
$inputValues[1] .= "." . str_repeat("9", $m); $inputValues[1] .= "." . str_repeat("4", $m);
} }
} }
$typeFull = "$dataType($m)"; $typeFull = "$dataType($m)";