summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Parser_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-17 13:55:56 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-17 13:55:56 +0100
commita9938a09e8214b778b8ab11f60501661bb2ac623 (patch)
treeceb787ca510c04d28c8df762f4183a060df72e28 /tests/codeigniter/libraries/Parser_test.php
parent6672b82087e8737b074f1b849aa77c9c761e2079 (diff)
Minor changes related to CI_User_agent
Fixed a bug where both accept_charset() and accept_lang() improperly parsed headers if they contained spaces between data separators (which is valid). Also made is_referral() testable by replacing its static cache var with a class property and added some more unit tests for the library as a whole.
Diffstat (limited to 'tests/codeigniter/libraries/Parser_test.php')
-rw-r--r--tests/codeigniter/libraries/Parser_test.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/codeigniter/libraries/Parser_test.php b/tests/codeigniter/libraries/Parser_test.php
index 6e5c192dd..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,11 +69,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}{/powers}\nsecond:{powers} {invisibility} {flying}{/powers}";
@@ -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}";