diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-17 16:31:23 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-17 16:31:23 +0100 |
commit | 3ddd564ca90b9296775c92566af942468a9ee358 (patch) | |
tree | 01a4870f0b9da57274dde4d5050813d1cef7a0bb | |
parent | e9c8c8988da2e6903b22e5444a2c9ddbe30a39ec (diff) |
[ci skip] Minor tests adjustments
5 files changed, 36 insertions, 33 deletions
diff --git a/tests/codeigniter/helpers/array_helper_test.php b/tests/codeigniter/helpers/array_helper_test.php index ba46e86f9..5a9958971 100644 --- a/tests/codeigniter/helpers/array_helper_test.php +++ b/tests/codeigniter/helpers/array_helper_test.php @@ -2,16 +2,16 @@ class Array_helper_test extends CI_TestCase { + public $my_array = array( + 'foo' => 'bar', + 'sally' => 'jim', + 'maggie' => 'bessie', + 'herb' => 'cook' + ); + public function set_up() { $this->helper('array'); - - $this->my_array = array( - 'foo' => 'bar', - 'sally' => 'jim', - 'maggie' => 'bessie', - 'herb' => 'cook' - ); } // ------------------------------------------------------------------------ @@ -19,9 +19,7 @@ class Array_helper_test extends CI_TestCase { public function test_element_with_existing_item() { $this->assertEquals(FALSE, element('testing', $this->my_array)); - $this->assertEquals('not set', element('testing', $this->my_array, 'not set')); - $this->assertEquals('bar', element('foo', $this->my_array)); } diff --git a/tests/codeigniter/helpers/captcha_helper_test.php b/tests/codeigniter/helpers/captcha_helper_test.php index fc86305e3..bb8760a15 100644 --- a/tests/codeigniter/helpers/captcha_helper_test.php +++ b/tests/codeigniter/helpers/captcha_helper_test.php @@ -4,7 +4,7 @@ class Captcha_helper_test extends CI_TestCase { public function test_create_captcha() { - $this->markTestSkipped('Cant easily test'); + $this->markTestSkipped("Can't test"); } }
\ No newline at end of file diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index de72dee78..ac71dfaf8 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -31,7 +31,7 @@ class Directory_helper_test extends CI_TestCase { // is_dir(), opendir(), etc. seem to fail on Windows + vfsStream when there are trailing backslashes in directory names if ( ! is_dir(vfsStream::url('testDir').DIRECTORY_SEPARATOR)) { - $this->markTestSkipped(); + $this->markTestSkipped("Can't test this under Windows"); return; } diff --git a/tests/codeigniter/helpers/email_helper_test.php b/tests/codeigniter/helpers/email_helper_test.php index fea452f5f..53a206825 100644 --- a/tests/codeigniter/helpers/email_helper_test.php +++ b/tests/codeigniter/helpers/email_helper_test.php @@ -15,4 +15,9 @@ class Email_helper_test extends CI_TestCase { $this->assertEquals(TRUE, valid_email('my.test@test.com')); } + public function test_send_mail() + { + $this->markTestSkipped("Can't test"); + } + }
\ No newline at end of file diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php index f3b0ebbe8..81ce5e394 100644 --- a/tests/codeigniter/helpers/inflector_helper_test.php +++ b/tests/codeigniter/helpers/inflector_helper_test.php @@ -10,11 +10,11 @@ class Inflector_helper_test extends CI_TestCase { public function test_singular() { $strs = array( - 'tellies' => 'telly', - 'smellies' => 'smelly', - 'abjectnesses' => 'abjectness', - 'smells' => 'smell', - 'equipment' => 'equipment' + 'tellies' => 'telly', + 'smellies' => 'smelly', + 'abjectnesses' => 'abjectness', + 'smells' => 'smell', + 'equipment' => 'equipment' ); foreach ($strs as $str => $expect) @@ -28,12 +28,12 @@ class Inflector_helper_test extends CI_TestCase { public function test_plural() { $strs = array( - 'telly' => 'tellies', - 'smelly' => 'smellies', - 'abjectness' => 'abjectnesses', // ref : http://en.wiktionary.org/wiki/abjectnesses - 'smell' => 'smells', - 'witch' => 'witches', - 'equipment' => 'equipment' + 'telly' => 'tellies', + 'smelly' => 'smellies', + 'abjectness' => 'abjectnesses', // ref : http://en.wiktionary.org/wiki/abjectnesses + 'smell' => 'smells', + 'witch' => 'witches', + 'equipment' => 'equipment' ); foreach ($strs as $str => $expect) @@ -48,9 +48,9 @@ class Inflector_helper_test extends CI_TestCase { { $strs = array( 'this is the string' => 'thisIsTheString', - 'this is another one' => 'thisIsAnotherOne', - 'i-am-playing-a-trick' => 'i-am-playing-a-trick', - 'what_do_you_think-yo?' => 'whatDoYouThink-yo?', + 'this is another one' => 'thisIsAnotherOne', + 'i-am-playing-a-trick' => 'i-am-playing-a-trick', + 'what_do_you_think-yo?' => 'whatDoYouThink-yo?', ); foreach ($strs as $str => $expect) @@ -64,10 +64,10 @@ class Inflector_helper_test extends CI_TestCase { public function test_underscore() { $strs = array( - 'this is the string' => 'this_is_the_string', - 'this is another one' => 'this_is_another_one', - 'i-am-playing-a-trick' => 'i-am-playing-a-trick', - 'what_do_you_think-yo?' => 'what_do_you_think-yo?', + 'this is the string' => 'this_is_the_string', + 'this is another one' => 'this_is_another_one', + '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) @@ -81,10 +81,10 @@ class Inflector_helper_test extends CI_TestCase { public function test_humanize() { $strs = array( - 'this_is_the_string' => 'This Is The String', - 'this_is_another_one' => 'This Is Another One', - 'i-am-playing-a-trick' => 'I-am-playing-a-trick', - 'what_do_you_think-yo?' => 'What Do You Think-yo?', + 'this_is_the_string' => 'This Is The String', + 'this_is_another_one' => 'This Is Another One', + '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) |