cvs: smarty / NEWS /libs Config_File.class.php Smarty.class.php Smarty_Compiler.class.php /unit_test README config.php smarty_unit_test.php smarty_unit_test_gui.php test_case.php test_cases.php

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1074291128@cvsserver>
mohrt		Fri Jan 16 17:12:08 2004 EDT

  Added files:                 
    /smarty/unit_test	README config.php smarty_unit_test.php 
                     	smarty_unit_test_gui.php test_case.php 
                     	test_cases.php 

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Config_File.class.php Smarty.class.php 
                	Smarty_Compiler.class.php 
  Log:
  update version numbers, add initial unit test directory

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
mohrt-20040116171208.txt (text/plain, 9.9 KB)
Index: smarty/NEWS
diff -u smarty/NEWS:1.426 smarty/NEWS:1.427
--- smarty/NEWS:1.426	Fri Jan 16 15:01:32 2004
+++ smarty/NEWS	Fri Jan 16 17:12:06 2004
@@ -1,3 +1,6 @@
+Version 2.6.1 (Jan 16, 2004)
+----------------------------
+
   - rename $smarty->tpl_error_reporting to $smarty->error_reporting
     (messju)
   - fix interpretation of $smarty->security in {html_image} (messju)
Index: smarty/libs/Config_File.class.php
diff -u smarty/libs/Config_File.class.php:1.62 smarty/libs/Config_File.class.php:1.63
--- smarty/libs/Config_File.class.php:1.62	Fri Jan 16 15:24:45 2004
+++ smarty/libs/Config_File.class.php	Fri Jan 16 17:12:07 2004
@@ -24,14 +24,14 @@
  * http://smarty.php.net/
  *
  * @link http://smarty.php.net/
- * @version 2.6.1
+ * @version 2.6.2-dev
  * @copyright Copyright: 2001-2003 ispi of Lincoln, Inc.
  * @author Andrei Zmievski <[email protected]>
  * @access public
  * @package Smarty
  */
 
-/* $Id: Config_File.class.php,v 1.62 2004/01/16 20:24:45 mohrt Exp $ */
+/* $Id: Config_File.class.php,v 1.63 2004/01/16 22:12:07 mohrt Exp $ */
 
 /**
  * Config file reading class
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.473 smarty/libs/Smarty.class.php:1.474
--- smarty/libs/Smarty.class.php:1.473	Fri Jan 16 15:24:45 2004
+++ smarty/libs/Smarty.class.php	Fri Jan 16 17:12:07 2004
@@ -40,10 +40,10 @@
  * @author Monte Ohrt <[email protected]>
  * @author Andrei Zmievski <[email protected]>
  * @package Smarty
- * @version 2.6.1
+ * @version 2.6.2-dev
  */
 
-/* $Id: Smarty.class.php,v 1.473 2004/01/16 20:24:45 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.474 2004/01/16 22:12:07 mohrt Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -480,7 +480,7 @@
      *
      * @var string
      */
-    var $_version              = '2.6.1';
+    var $_version              = '2.6.2-dev';
 
     /**
      * current template inclusion depth
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.307 smarty/libs/Smarty_Compiler.class.php:1.308
--- smarty/libs/Smarty_Compiler.class.php:1.307	Fri Jan 16 15:24:45 2004
+++ smarty/libs/Smarty_Compiler.class.php	Fri Jan 16 17:12:07 2004
@@ -34,12 +34,12 @@
  * @link http://smarty.php.net/
  * @author Monte Ohrt <[email protected]>
  * @author Andrei Zmievski <[email protected]>
- * @version 2.6.1
+ * @version 2.6.2-dev
  * @copyright 2001-2003 ispi of Lincoln, Inc.
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.307 2004/01/16 20:24:45 mohrt Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.308 2004/01/16 22:12:07 mohrt Exp $ */
 
 /**
  * Template compiling class

Index: smarty/unit_test/config.php
+++ smarty/unit_test/config.php
<?php

define('SMARTY_DIR', '../libs/');

?>

Index: smarty/unit_test/smarty_unit_test.php
+++ smarty/unit_test/smarty_unit_test.php
<?php

require_once 'test_cases.php';
require_once 'PHPUnit.php';

$suite = new PHPUnit_TestSuite("SmartyTest");
$result = PHPUnit::run($suite);

echo $result -> toString();
?>

Index: smarty/unit_test/smarty_unit_test_gui.php
+++ smarty/unit_test/smarty_unit_test_gui.php
<?php

require_once 'test_cases.php';
require_once 'PHPUnit.php';

$suite = new PHPUnit_TestSuite("SmartyTest");
$result = PHPUnit::run($suite);

echo $result -> toHTML();
?>

Index: smarty/unit_test/test_case.php
+++ smarty/unit_test/test_case.php
<?php

require_once './config.php';
require_once SMARTY_DIR . 'Smarty.class.php';
require_once 'PHPUnit.php';
    
class SmartyTest extends PHPUnit_TestCase {
    // contains the object handle of the string class
    var $abc;
    // constructor of the test suite
    function SmartyTest($name) {
       $this->PHPUnit_TestCase($name);
    }
    // called before the test functions will be executed    
    // this function is defined in PHPUnit_TestCase and overwritten 
    // here
    function setUp() {
        // create a new instance of String with the
        // string 'abc'
        $this->smarty = new Smarty;
    }
    // called after the test functions are executed    
    // this function is defined in PHPUnit_TestCase and overwritten 
    // here    
    function tearDown() {
        // delete your instance
        unset($this->smarty);
    }
    // test that template_dir exists
    function test_template_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->template_dir));                       
    }
    // test that template_dir is a directory
    function test_template_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->template_dir));                       
    }
    // test that template_dir is readable
    function test_template_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->template_dir));                       
    }
    // test that config_dir exists
    function test_config_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->config_dir));                       
    }
    // test that config_dir is a directory
    function test_config_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->config_dir));                       
    }
    // test that config_dir is readable
    function test_config_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->config_dir));                       
    }
    // test that compile_dir exists
    function test_compile_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->compile_dir));                       
    }
    // test that compile_dir is a directory
    function test_compile_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->compile_dir));                       
    }
    // test that compile_dir is readable
    function test_compile_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->compile_dir));                       
    }
    // test that compile_dir is writable
    function test_compile_dir_is_writable() {
        $this->assertTrue(is_writable($this->smarty->compile_dir));                       
    }
    // test that cache_dir exists
    function test_cache_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->cache_dir));                       
    }
    // test that cache_dir is a directory
    function test_cache_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->cache_dir));                       
    }
    // test that cache_dir is readable
    function test_cache_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->cache_dir));                       
    }
    // test that cache_dir is writable
    function test_cache_dir_is_writable() {
        $this->assertTrue(is_writable($this->smarty->cache_dir));                       
    }

  }
?>

Index: smarty/unit_test/test_cases.php
+++ smarty/unit_test/test_cases.php
<?php

define('SMARTY_DIR', '../libs/');

require_once SMARTY_DIR . 'Smarty.class.php';
require_once 'PHPUnit.php';
    
class SmartyTest extends PHPUnit_TestCase {
    // contains the object handle of the string class
    var $abc;
    // constructor of the test suite
    function SmartyTest($name) {
       $this->PHPUnit_TestCase($name);
    }
    // called before the test functions will be executed    
    // this function is defined in PHPUnit_TestCase and overwritten 
    // here
    function setUp() {
        // create a new instance of String with the
        // string 'abc'
        $this->smarty = new Smarty;
    }
    // called after the test functions are executed    
    // this function is defined in PHPUnit_TestCase and overwritten 
    // here    
    function tearDown() {
        // delete your instance
        unset($this->smarty);
    }
    // test that template_dir exists
    function test_template_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->template_dir));                       
    }
    // test that template_dir is a directory
    function test_template_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->template_dir));                       
    }
    // test that template_dir is readable
    function test_template_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->template_dir));                       
    }
    // test that config_dir exists
    function test_config_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->config_dir));                       
    }
    // test that config_dir is a directory
    function test_config_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->config_dir));                       
    }
    // test that config_dir is readable
    function test_config_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->config_dir));                       
    }
    // test that compile_dir exists
    function test_compile_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->compile_dir));                       
    }
    // test that compile_dir is a directory
    function test_compile_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->compile_dir));                       
    }
    // test that compile_dir is readable
    function test_compile_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->compile_dir));                       
    }
    // test that compile_dir is writable
    function test_compile_dir_is_writable() {
        $this->assertTrue(is_writable($this->smarty->compile_dir));                       
    }
    // test that cache_dir exists
    function test_cache_dir_exists() {
        $this->assertTrue(file_exists($this->smarty->cache_dir));                       
    }
    // test that cache_dir is a directory
    function test_cache_dir_is_dir() {
        $this->assertTrue(is_dir($this->smarty->cache_dir));                       
    }
    // test that cache_dir is readable
    function test_cache_dir_is_readable() {
        $this->assertTrue(is_readable($this->smarty->cache_dir));                       
    }
    // test that cache_dir is writable
    function test_cache_dir_is_writable() {
        $this->assertTrue(is_writable($this->smarty->cache_dir));                       
    }

  }
?>
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.