ソースを参照

Fix tests.

PHP < 7.1 handles type casting of numeric values in scientific notation differently.
ADmad 7 年 前
コミット
dc53a1fb1c
1 ファイル変更5 行追加1 行削除
  1. 5 1
      tests/TestCase/Database/Type/IntegerTypeTest.php

+ 5 - 1
tests/TestCase/Database/Type/IntegerTypeTest.php

@@ -162,7 +162,11 @@ class IntegerTypeTest extends TestCase
         $this->assertNull($result);
 
         $result = $this->type->marshal('+0123.45e2');
-        $this->assertSame(12345, $result);
+        if (version_compare(PHP_VERSION, '7.1', '<')) {
+            $this->assertSame(123, $result);
+        } else {
+            $this->assertSame(12345, $result);
+        }
     }
 
     /**