File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,12 @@ public function getInt(string $columnName): int
34
34
{
35
35
return $ this ->get ($ columnName );
36
36
}
37
+
38
+ /**
39
+ * @deprecated since 1.3 and will be delete in 2.0. Use get()
40
+ */
41
+ public function getDouble (string $ columnName ): float
42
+ {
43
+ return $ this ->get ($ columnName );
44
+ }
37
45
}
Original file line number Diff line number Diff line change @@ -383,6 +383,20 @@ public function testDbase7int(): void
383
383
self ::assertSame (2147483647 , $ table ->nextRecord ()->getInt ('int ' ));
384
384
self ::assertSame (-2147483647 , $ table ->nextRecord ()->getInt ('int ' ));
385
385
}
386
+
387
+ public function testDbase7double (): void
388
+ {
389
+ $ table = new Table (__DIR__ .'/Resources/dBase/dBaseVII_double.dbf ' );
390
+ self ::assertSame (1 , $ table ->getColumnCount ());
391
+ self ::assertSame (5 , $ table ->getRecordCount ());
392
+ self ::assertSame (TableType::DBASE_7_NOMEMO , $ table ->getVersion ());
393
+
394
+ self ::assertSame (-199.99 , $ table ->nextRecord ()->getDouble ('double ' ));
395
+ self ::assertSame (-74.62 , $ table ->nextRecord ()->getDouble ('double ' ));
396
+ self ::assertSame (43.65 , $ table ->nextRecord ()->getDouble ('double ' ));
397
+ self ::assertSame (150.48 , $ table ->nextRecord ()->getDouble ('double ' ));
398
+ self ::assertSame (0.0 , $ table ->nextRecord ()->getDouble ('double ' ));
399
+ }
386
400
387
401
protected function assertMemoImg (Table $ table )
388
402
{
You can’t perform that action at this time.
0 commit comments