summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 14:51:41 +0100
commit3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch)
treef32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /tests/codeigniter/helpers
parent275cf274860c6ed181d50b398efd3a21d7ba9135 (diff)
parenta9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (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/helpers')
-rw-r--r--tests/codeigniter/helpers/directory_helper_test.php8
-rw-r--r--tests/codeigniter/helpers/form_helper_test.php15
2 files changed, 19 insertions, 4 deletions
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 &quot;quoted&quot; text.',
+ form_prep('Here is a string containing "quoted" text.')
+ );
+
+ $this->assertEquals(
+ 'Here is a string containing a &lt;tag&gt;.',
+ form_prep('Here is a string containing a <tag>.', TRUE)
+ );
+ }
+
}
/* End of file form_helper_test.php */ \ No newline at end of file