summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Model/ConfigTest.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/units/Model/ConfigTest.php b/tests/units/Model/ConfigTest.php
index c0ed0313..832575b8 100644
--- a/tests/units/Model/ConfigTest.php
+++ b/tests/units/Model/ConfigTest.php
@@ -7,6 +7,20 @@ use Core\Session;
class ConfigTest extends Base
{
+ public function testSaveApplicationUrl()
+ {
+ $c = new Config($this->container);
+
+ $this->assertTrue($c->save(array('application_url' => 'http://localhost/')));
+ $this->assertEquals('http://localhost/', $c->get('application_url'));
+
+ $this->assertTrue($c->save(array('application_url' => 'http://localhost')));
+ $this->assertEquals('http://localhost/', $c->get('application_url'));
+
+ $this->assertTrue($c->save(array('application_url' => '')));
+ $this->assertEquals('', $c->get('application_url'));
+ }
+
public function testDefaultValues()
{
$c = new Config($this->container);
@@ -56,11 +70,4 @@ class ConfigTest extends Base
session_id('');
unset($this->container['session']);
}
-
- public function testSave()
- {
- $c = new Config($this->container);
- $this->assertTrue($c->save(array('application_url' => 'http://localhost/')));
- $this->assertEquals('http://localhost/', $c->get('application_url'));
- }
}