Make sure there is always a trailing slash for application_url
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user