diff --git a/composer.json b/composer.json index 517a23c..cd3a244 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,10 @@ "phpunit/php-code-coverage": "^6.1@dev", "php-coveralls/php-coveralls": "2.1.x-dev" }, + "suggest": { + "symfony/intl": "If you just need the en locale", + "ext-intl": "For locales other than en" + }, "license": "MIT", "authors": [ { diff --git a/test/Mhorninger/MySQLite/StringMethodTest.php b/test/Mhorninger/MySQLite/StringMethodTest.php index 45232bb..588db19 100644 --- a/test/Mhorninger/MySQLite/StringMethodTest.php +++ b/test/Mhorninger/MySQLite/StringMethodTest.php @@ -49,6 +49,14 @@ public function testFormatNull() $this->assertNull($result->value); } + public function testFormatWithMathProblem() + { + $query = 'SELECT FORMAT((3600 * 1.7 / 281), 1) as value'; + $result = $this->conn->selectOne($query); + $expected = '21.8'; + $this->assertEquals($expected, $result->value); + } + //endregion //region LPAD tests @@ -74,6 +82,5 @@ public function testLpadNull() $result = $this->conn->selectOne($query); $this->assertNull($result->value); } - //endregion }