add a couple more tests

This commit is contained in:
mohrt
2004-01-23 16:05:59 +00:00
parent a36697993e
commit 724c49553a
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1 @@
foo = "bar"

View File

@@ -0,0 +1 @@
foo = 'bar'

View File

@@ -228,6 +228,23 @@ class SmartyTest extends PHPUnit_TestCase {
$this->assertEquals($this->smarty->fetch('assign_var.tpl'), 'bar');
}
/* CONFIG FILE TESTS */
// test assigning a quoted global variable
function test_config_load_globals_double_quotes() {
// load the global var
$this->smarty->config_load('globals_double_quotes.conf');
// test that it is assigned
$this->assertEquals($this->smarty->_config[0]['vars']['foo'], 'bar');
}
// test assigning a quoted global
function test_config_load_globals_single_quotes() {
// load the global var
$this->smarty->config_load('globals_single_quotes.conf');
// test that it is assigned
$this->assertEquals($this->smarty->_config[0]['vars']['foo'], 'bar');
}
}
?>