diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-06-11 14:35:18 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-06-11 14:47:29 +0200 |
commit | 3872abd824c9371af6cbb45e6e9bbfcb31094f98 (patch) | |
tree | 2124bbbd0c4d022ff99c04ab4116f6778f28c384 /tests/wrapper/phpbb_php_ini_test.php | |
parent | fb279c9677641db5efa38f24c51db93df004cb46 (diff) | |
download | forums-3872abd824c9371af6cbb45e6e9bbfcb31094f98.tar forums-3872abd824c9371af6cbb45e6e9bbfcb31094f98.tar.gz forums-3872abd824c9371af6cbb45e6e9bbfcb31094f98.tar.bz2 forums-3872abd824c9371af6cbb45e6e9bbfcb31094f98.tar.xz forums-3872abd824c9371af6cbb45e6e9bbfcb31094f98.zip |
[ticket/10931] Also test for negative values.
PHPBB3-10931
Diffstat (limited to 'tests/wrapper/phpbb_php_ini_test.php')
-rw-r--r-- | tests/wrapper/phpbb_php_ini_test.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/wrapper/phpbb_php_ini_test.php b/tests/wrapper/phpbb_php_ini_test.php index cbb05e98e9..84e2b5e92e 100644 --- a/tests/wrapper/phpbb_php_ini_test.php +++ b/tests/wrapper/phpbb_php_ini_test.php @@ -38,12 +38,14 @@ class phpbb_wrapper_phpbb_php_ini_test extends phpbb_test_case public function test_get_int() { $this->assertEquals(1234, $this->php_ini->get_int('1234')); + $this->assertEquals(-12345, $this->php_ini->get_int('-12345')); $this->assertEquals(false, $this->php_ini->get_int('phpBB')); } public function test_get_float() { $this->assertEquals(1234.0, $this->php_ini->get_float('1234')); + $this->assertEquals(-12345.0, $this->php_ini->get_float('-12345')); $this->assertEquals(false, $this->php_ini->get_float('phpBB')); } @@ -51,9 +53,14 @@ class phpbb_wrapper_phpbb_php_ini_test extends phpbb_test_case { $this->assertEquals(false, $this->php_ini->get_bytes('phpBB')); $this->assertEquals(false, $this->php_ini->get_bytes('k')); + $this->assertEquals(false, $this->php_ini->get_bytes('-k')); $this->assertEquals(false, $this->php_ini->get_bytes('M')); + $this->assertEquals(false, $this->php_ini->get_bytes('-M')); $this->assertEquals(32 * pow(2, 20), $this->php_ini->get_bytes('32m')); + $this->assertEquals(- 32 * pow(2, 20), $this->php_ini->get_bytes('-32m')); $this->assertEquals(8 * pow(2, 30), $this->php_ini->get_bytes('8G')); + $this->assertEquals(- 8 * pow(2, 30), $this->php_ini->get_bytes('-8G')); $this->assertEquals(1234, $this->php_ini->get_bytes('1234')); + $this->assertEquals(-12345, $this->php_ini->get_bytes('-12345')); } } |