summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-27 14:25:05 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-27 14:25:05 +0200
commit5232ba07752ffa783d03754c3a869d9f73ccae69 (patch)
treedd199caa518dcfdabfb4fd221ca91a410e7a1146 /tests/codeigniter/core
parent60826db46d3f9ceabcc280c494a975007423e64a (diff)
Docblock improvements to the Config library and remove CI_Config::_assign_to_config()
Existance of _assign_to_config() is pointless as this method consists just of a foreach calling CI_Config::set_item() and is only called by CodeIgniter.php - moved that foreach() in there instead.
Diffstat (limited to 'tests/codeigniter/core')
-rw-r--r--tests/codeigniter/core/Config_test.php25
1 files changed, 2 insertions, 23 deletions
diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php
index d652a625e..be426d070 100644
--- a/tests/codeigniter/core/Config_test.php
+++ b/tests/codeigniter/core/Config_test.php
@@ -9,7 +9,7 @@ class Config_test extends CI_TestCase {
// set predictable config values
$this->cfg = array(
'index_page' => 'index.php',
- 'base_url' => 'http://example.com/',
+ 'base_url' => 'http://example.com/',
'subclass_prefix' => 'MY_'
);
$this->ci_set_config($this->cfg);
@@ -38,7 +38,6 @@ class Config_test extends CI_TestCase {
$this->assertFalse($this->config->item('not_yet_set'));
$this->config->set_item('not_yet_set', 'is set');
-
$this->assertEquals('is set', $this->config->item('not_yet_set'));
}
@@ -50,7 +49,6 @@ class Config_test extends CI_TestCase {
$this->assertFalse($this->config->slash_item('no_good_item'));
$this->assertEquals($this->cfg['base_url'], $this->config->slash_item('base_url'));
-
$this->assertEquals($this->cfg['subclass_prefix'].'/', $this->config->slash_item('subclass_prefix'));
}
@@ -124,7 +122,7 @@ class Config_test extends CI_TestCase {
$q_string = $this->config->item('enable_query_strings');
$this->config->set_item('enable_query_strings', FALSE);
- $uri= 'test';
+ $uri = 'test';
$uri2 = '1';
$this->assertEquals($index_page.'/'.$uri, $this->config->site_url($uri));
$this->assertEquals($index_page.'/'.$uri.'/'.$uri2, $this->config->site_url(array($uri, $uri2)));
@@ -137,7 +135,6 @@ class Config_test extends CI_TestCase {
$this->assertEquals($index_page.'/'.$uri.$suffix.'?'.$arg, $this->config->site_url($uri.'?'.$arg));
$this->config->set_item('url_suffix', FALSE);
-
$this->config->set_item('enable_query_strings', TRUE);
$this->assertEquals($index_page.'?'.$uri, $this->config->site_url($uri));
@@ -233,22 +230,4 @@ class Config_test extends CI_TestCase {
$this->assertNull($this->config->load($file));
}
- // --------------------------------------------------------------------
-
- public function test_assign_to_config()
- {
- $key1 = 'test';
- $key2 = '1';
- $val1 = 'foo';
- $val2 = 'bar';
- $cfg = array(
- $key1 => $val1,
- $key2 => $val2
- );
-
- $this->assertNull($this->config->_assign_to_config($cfg));
- $this->assertEquals($val1, $this->config->item($key1));
- $this->assertEquals($val2, $this->config->item($key2));
- }
-
} \ No newline at end of file