summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers/inflector_helper_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-05 21:45:41 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-05 21:45:41 +0200
commit5b5021812ea6dc859312e00b6b0f078eea54c88d (patch)
tree0a8840ee0429cc405cb597438a73d03bca970c1a /tests/codeigniter/helpers/inflector_helper_test.php
parent49d08053257b55db511eaca08b8ab5d12149f3b6 (diff)
parentdbad54e09a39a77c7404dee9ca1a6b34299469d0 (diff)
Merge upstream branch
Diffstat (limited to 'tests/codeigniter/helpers/inflector_helper_test.php')
-rw-r--r--tests/codeigniter/helpers/inflector_helper_test.php31
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