summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Useragent_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/libraries/Useragent_test.php')
-rw-r--r--tests/codeigniter/libraries/Useragent_test.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/codeigniter/libraries/Useragent_test.php b/tests/codeigniter/libraries/Useragent_test.php
index 7dad7ac54..e3726554e 100644
--- a/tests/codeigniter/libraries/Useragent_test.php
+++ b/tests/codeigniter/libraries/Useragent_test.php
@@ -1,7 +1,7 @@
<?php
class UserAgent_test extends CI_TestCase {
-
+
protected $_user_agent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27';
protected $_mobile_ua = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7';
@@ -10,12 +10,11 @@ class UserAgent_test extends CI_TestCase {
// set a baseline user agent
$_SERVER['HTTP_USER_AGENT'] = $this->_user_agent;
- $obj = new StdClass;
- $obj->agent = new Mock_Libraries_UserAgent();
+ $this->ci_vfs_clone('application/config/user_agents.php');
- $this->ci_instance($obj);
+ $this->agent = new Mock_Libraries_UserAgent();
- $this->agent = $obj->agent;
+ $this->ci_instance_var('agent', $this->agent);
}
// --------------------------------------------------------------------
@@ -82,6 +81,4 @@ class UserAgent_test extends CI_TestCase {
$this->assertFalse($this->agent->accept_charset());
}
- // --------------------------------------------------------------------
-
} \ No newline at end of file