diff options
author | Andrey Andreev <narf@devilix.net> | 2018-01-13 12:57:11 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-01-13 12:57:11 +0100 |
commit | 02a0518e1c56ba3506f370362ac5ebdb8a138312 (patch) | |
tree | 8b4684192b403dcae17d298eb4fc9e7ab001acad /tests/codeigniter/helpers/number_helper_test.php | |
parent | f0b9735d5857e6c07c8f5824b13cff4828db3cfe (diff) |
[ci skip] 3.1.7 release
Diffstat (limited to 'tests/codeigniter/helpers/number_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/number_helper_test.php | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/codeigniter/helpers/number_helper_test.php b/tests/codeigniter/helpers/number_helper_test.php deleted file mode 100644 index 663e354fe..000000000 --- a/tests/codeigniter/helpers/number_helper_test.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -class Number_helper_test extends CI_TestCase { - - public function set_up() - { - $this->helper('number'); - - // Grab the core lang class - $lang_cls = $this->ci_core_class('lang'); - - // Mock away load, too much going on in there, - // we'll just check for the expected parameter - $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); - $lang->expects($this->once()) - ->method('load') - ->with($this->equalTo('number')); - - // Assign the proper language array - $lang->language = $this->lang('number'); - - // We don't have a controller, so just create - // a cheap class to act as our super object. - // Make sure it has a lang attribute. - $this->ci_instance_var('lang', $lang); - } - - public function test_byte_format() - { - $this->assertEquals('456 Bytes', byte_format(456)); - } - - public function test_kb_format() - { - $this->assertEquals('4.5 KB', byte_format(4567)); - } - - public function test_kb_format_medium() - { - $this->assertEquals('44.6 KB', byte_format(45678)); - } - - public function test_kb_format_large() - { - $this->assertEquals('446.1 KB', byte_format(456789)); - } - - public function test_mb_format() - { - $this->assertEquals('3.3 MB', byte_format(3456789)); - } - - public function test_gb_format() - { - $this->assertEquals('1.8 GB', byte_format(1932735283.2)); - } - - public function test_tb_format() - { - $this->assertEquals('112,283.3 TB', byte_format(123456789123456789)); - } - -} |