Commit 0e4da3ca authored by Padraig O'Sullivan's avatar Padraig O'Sullivan

Based on whether we are on 32 or 64 bit platform, postgres will return a...

Based on whether we are on 32 or 64 bit platform, postgres will return a string or an int for the expected php type of a bigint that is > 32 bits.
parent c7295b49
......@@ -48,12 +48,13 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$obj = new \stdClass();
$obj->foo = "bar";
$obj->bar = "baz";
$bigIntExpectedPhpType = (PHP_INT_SIZE === 4) ? 'string' : 'int';
return array(
array('string', 'ABCDEFGaaaBBB', 'string'),
array('boolean', true, 'bool'),
array('boolean', false, 'bool'),
array('bigint', 12345678, 'string'),
array('bigint', 12345678, $bigIntExpectedPhpType),
array('smallint', 123, 'int'),
array('datetime', new \DateTime('2010-04-05 10:10:10'), 'DateTime'),
array('datetimetz', new \DateTime('2010-04-05 10:10:10'), 'DateTime'),
......@@ -98,4 +99,4 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
}
}
}
}
\ No newline at end of file
}
Markdown is supported
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