diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-09 21:24:46 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-09 21:24:46 +0200 |
commit | 99b782d8a3d92c4703a059cbd62e2f1e6fea689c (patch) | |
tree | 622bd77c72eb812e37d4b3816b93528679d71425 /tests/codeigniter/helpers/inflector_helper_test.php | |
parent | 1b60fda70ff1e1801c133575c530ef0a5a450029 (diff) |
Cleanup and optimize helper tests for speed
Diffstat (limited to 'tests/codeigniter/helpers/inflector_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/inflector_helper_test.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php index 9e9478711..f3b0ebbe8 100644 --- a/tests/codeigniter/helpers/inflector_helper_test.php +++ b/tests/codeigniter/helpers/inflector_helper_test.php @@ -1,12 +1,12 @@ <?php class Inflector_helper_test extends CI_TestCase { - + public function set_up() { $this->helper('inflector'); } - + public function test_singular() { $strs = array( @@ -16,15 +16,15 @@ class Inflector_helper_test extends CI_TestCase { 'smells' => 'smell', 'equipment' => 'equipment' ); - + foreach ($strs as $str => $expect) { $this->assertEquals($expect, singular($str)); } } - + // -------------------------------------------------------------------- - + public function test_plural() { $strs = array( @@ -35,15 +35,15 @@ class Inflector_helper_test extends CI_TestCase { 'witch' => 'witches', 'equipment' => 'equipment' ); - + foreach ($strs as $str => $expect) { $this->assertEquals($expect, plural($str)); - } - } + } + } // -------------------------------------------------------------------- - + public function test_camelize() { $strs = array( @@ -52,15 +52,15 @@ class Inflector_helper_test extends CI_TestCase { 'i-am-playing-a-trick' => 'i-am-playing-a-trick', 'what_do_you_think-yo?' => 'whatDoYouThink-yo?', ); - + foreach ($strs as $str => $expect) { $this->assertEquals($expect, camelize($str)); } - } + } // -------------------------------------------------------------------- - + public function test_underscore() { $strs = array( @@ -69,7 +69,7 @@ class Inflector_helper_test extends CI_TestCase { 'i-am-playing-a-trick' => 'i-am-playing-a-trick', 'what_do_you_think-yo?' => 'what_do_you_think-yo?', ); - + foreach ($strs as $str => $expect) { $this->assertEquals($expect, underscore($str)); @@ -77,7 +77,7 @@ class Inflector_helper_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_humanize() { $strs = array( @@ -86,10 +86,11 @@ class Inflector_helper_test extends CI_TestCase { 'i-am-playing-a-trick' => 'I-am-playing-a-trick', 'what_do_you_think-yo?' => 'What Do You Think-yo?', ); - + foreach ($strs as $str => $expect) { $this->assertEquals($expect, humanize($str)); } } + }
\ No newline at end of file |