Commit 533ce4e6 authored by Padraig O'Sullivan's avatar Padraig O'Sullivan Committed by Benjamin Eberlei

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 0019d0b8
...@@ -48,12 +48,13 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -48,12 +48,13 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
$obj = new \stdClass(); $obj = new \stdClass();
$obj->foo = "bar"; $obj->foo = "bar";
$obj->bar = "baz"; $obj->bar = "baz";
$bigIntExpectedPhpType = (PHP_INT_SIZE === 4) ? 'string' : 'int';
return array( return array(
array('string', 'ABCDEFGaaaBBB', 'string'), array('string', 'ABCDEFGaaaBBB', 'string'),
array('boolean', true, 'bool'), array('boolean', true, 'bool'),
array('boolean', false, 'bool'), array('boolean', false, 'bool'),
array('bigint', 12345678, 'string'), array('bigint', 12345678, $bigIntExpectedPhpType),
array('smallint', 123, 'int'), array('smallint', 123, 'int'),
array('datetime', new \DateTime('2010-04-05 10:10:10'), 'DateTime'), array('datetime', new \DateTime('2010-04-05 10:10:10'), 'DateTime'),
array('datetimetz', new \DateTime('2010-04-05 10:10:10'), 'DateTime'), array('datetimetz', new \DateTime('2010-04-05 10:10:10'), 'DateTime'),
......
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