diff options
author | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
---|---|---|
committer | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
commit | 3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch) | |
tree | f32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /tests/codeigniter | |
parent | 275cf274860c6ed181d50b398efd3a21d7ba9135 (diff) | |
parent | a9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts:
user_guide_src/source/changelog.rst
Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Loader_test.php | 1 | ||||
-rw-r--r-- | tests/codeigniter/database/DB_driver_test.php | 2 | ||||
-rw-r--r-- | tests/codeigniter/helpers/directory_helper_test.php | 8 | ||||
-rw-r--r-- | tests/codeigniter/helpers/form_helper_test.php | 15 |
4 files changed, 20 insertions, 6 deletions
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 816587a49..ecc5ca933 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -493,7 +493,6 @@ class Loader_test extends CI_TestCase { ); $this->ci_vfs_create('autoload', '<?php $autoload = '.var_export($cfg, TRUE).';', $this->ci_app_root, 'config'); - // Run initialize and autoloader $this->load->initialize(); // Verify path diff --git a/tests/codeigniter/database/DB_driver_test.php b/tests/codeigniter/database/DB_driver_test.php index 9e16e29b4..1f48ca984 100644 --- a/tests/codeigniter/database/DB_driver_test.php +++ b/tests/codeigniter/database/DB_driver_test.php @@ -5,7 +5,7 @@ class DB_driver_test extends CI_TestCase { public function test_initialize() { $config = Mock_Database_DB::config(DB_DRIVER); - $driver_name = current(explode('/', DB_DRIVER)); + sscanf(DB_DRIVER, '%[^/]/', $driver_name); $driver = $this->$driver_name($config[DB_DRIVER]); $this->assertTrue($driver->initialize()); diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index c39ccd8d0..41370e6e7 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -28,9 +28,9 @@ class Directory_helper_test extends CI_TestCase { // test default recursive behavior $expected = array( - 'libraries' => array( + 'libraries/' => array( 'benchmark.html', - 'database' => array('active_record.html', 'binds.html'), + 'database/' => array('active_record.html', 'binds.html'), 'email.html', '0' ) @@ -39,12 +39,12 @@ class Directory_helper_test extends CI_TestCase { $this->assertEquals($expected, directory_map(vfsStream::url('testDir'))); // test detection of hidden files - $expected['libraries'][] = '.hiddenfile.txt'; + $expected['libraries/'][] = '.hiddenfile.txt'; $this->assertEquals($expected, directory_map(vfsStream::url('testDir'), FALSE, TRUE)); // test recursion depth behavior - $this->assertEquals(array('libraries'), directory_map(vfsStream::url('testDir'), 1)); + $this->assertEquals(array('libraries/'), directory_map(vfsStream::url('testDir'), 1)); } } diff --git a/tests/codeigniter/helpers/form_helper_test.php b/tests/codeigniter/helpers/form_helper_test.php index 03278581d..89165271e 100644 --- a/tests/codeigniter/helpers/form_helper_test.php +++ b/tests/codeigniter/helpers/form_helper_test.php @@ -272,6 +272,21 @@ EOH; $this->assertEquals($expected, form_close('</div></div>')); } + // ------------------------------------------------------------------------ + + public function test_form_prep() + { + $this->assertEquals( + 'Here is a string containing "quoted" text.', + form_prep('Here is a string containing "quoted" text.') + ); + + $this->assertEquals( + 'Here is a string containing a <tag>.', + form_prep('Here is a string containing a <tag>.', TRUE) + ); + } + } /* End of file form_helper_test.php */
\ No newline at end of file |