summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Parser_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/libraries/Parser_test.php')
-rw-r--r--tests/codeigniter/libraries/Parser_test.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/codeigniter/libraries/Parser_test.php b/tests/codeigniter/libraries/Parser_test.php
index 394c22692..3755cf1a0 100644
--- a/tests/codeigniter/libraries/Parser_test.php
+++ b/tests/codeigniter/libraries/Parser_test.php
@@ -33,7 +33,7 @@ class Parser_test extends CI_TestCase {
// --------------------------------------------------------------------
- public function test_parse_simple_string()
+ public function test_parse_string()
{
$data = array(
'title' => 'Page Title',
@@ -69,16 +69,12 @@ class Parser_test extends CI_TestCase {
{
$data = array(
'title' => 'Super Heroes',
- 'powers' => array(
- array(
- 'invisibility' => 'yes',
- 'flying' => 'no'),
- )
+ 'powers' => array(array('invisibility' => 'yes', 'flying' => 'no'))
);
- $template = "{title}\n{powers}{invisibility}\n{flying}{/powers}";
+ $template = "{title}\n{powers}{invisibility}\n{flying}{/powers}\nsecond:{powers} {invisibility} {flying}{/powers}";
- $this->assertEquals("Super Heroes\nyes\nno", $this->parser->parse_string($template, $data, TRUE));
+ $this->assertEquals("Super Heroes\nyes\nno\nsecond: yes no", $this->parser->parse_string($template, $data, TRUE));
}
// --------------------------------------------------------------------
@@ -87,11 +83,7 @@ class Parser_test extends CI_TestCase {
{
$data = array(
'title' => 'Super Heroes',
- 'powers' => array(
- array(
- 'invisibility' => 'yes',
- 'flying' => 'no'),
- )
+ 'powers' => array(array('invisibility' => 'yes', 'flying' => 'no'))
);
$template = "{title}\n{powers}{invisibility}\n{flying}";