cvs: smarty /unit_test test_cases.php /unit_test/configs globals_double_quotes.conf globals_single_quotes.conf

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1074873959@cvsserver>
mohrt		Fri Jan 23 11:05:59 2004 EDT

  Added files:                 
    /smarty/unit_test/configs	globals_double_quotes.conf 
                             	globals_single_quotes.conf 

  Modified files:              
    /smarty/unit_test	test_cases.php 
  Log:
  add a couple more tests
  
  
http://cvs.php.net/diff.php/smarty/unit_test/test_cases.php?r1=1.2&r2=1.3&ty=u
Index: smarty/unit_test/test_cases.php
diff -u smarty/unit_test/test_cases.php:1.2 smarty/unit_test/test_cases.php:1.3
--- smarty/unit_test/test_cases.php:1.2	Fri Jan 16 17:51:48 2004
+++ smarty/unit_test/test_cases.php	Fri Jan 23 11:05:58 2004
@@ -228,6 +228,23 @@
         $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');
+    }
     
   }
 ?>

http://cvs.php.net/co.php/smarty/unit_test/configs/globals_double_quotes.conf?r=1.1&p=1
Index: smarty/unit_test/configs/globals_double_quotes.conf
+++ smarty/unit_test/configs/globals_double_quotes.conf
foo = "bar"

http://cvs.php.net/co.php/smarty/unit_test/configs/globals_single_quotes.conf?r=1.1&p=1
Index: smarty/unit_test/configs/globals_single_quotes.conf
+++ smarty/unit_test/configs/globals_single_quotes.conf
foo = 'bar'

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.