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
3434 {
3535 return $ this ->get ($ columnName );
3636 }
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+ }
3745}
Original file line number Diff line number Diff line change @@ -383,6 +383,20 @@ public function testDbase7int(): void
383383 self ::assertSame (2147483647 , $ table ->nextRecord ()->getInt ('int ' ));
384384 self ::assertSame (-2147483647 , $ table ->nextRecord ()->getInt ('int ' ));
385385 }
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+ }
386400
387401 protected function assertMemoImg (Table $ table )
388402 {
You can’t perform that action at this time.
0 commit comments