[PHPVortex-Commit] phpvortex/test SEC_EditTest.class.php,NONE,1.1 vortex_test_app.php,NONE,1.1
Brought to you by:
nop144666
From: Thiago R. <nop...@us...> - 2004-10-13 16:49:01
|
Update of /cvsroot/phpvortex/phpvortex/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23802/test Added Files: SEC_EditTest.class.php vortex_test_app.php Log Message: Test programs: Added vortex_test_app.php to test APP_Base functionality --- NEW FILE: SEC_EditTest.class.php --- <?php /** * File for class SEC_EditTest. * * @package Vortex * @subpackage Debug * @author Thiago Ramon Gonçalves Montoya * @copyright Copyright 2004, Thiago Ramon Gonçalves Montoya * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License */ /** Require the base class */ require_once('../SEC_Edit.class.php'); /** Require the Test Table class */ require_once('TB_Test.class.php'); /** * Class for SEC_Edit testing. * * @package Vortex * @subpackage Debug */ class SEC_EditTest extends SEC_Edit { /** * Database. * * @var DB_Base */ var $db = NULL; /** * Constructor: Set the table. * * @param array $opts Parameters for the object, as 'var' => 'value'. */ function SEC_EditTest($opts = array()) { $opts['table'] =& new TB_Test($opts['db']); $opts['recspage'] = 5; // Load all parameters into member variables. parent::SEC_Edit($opts); } } ?> --- NEW FILE: vortex_test_app.php --- <?php /** * Test file for the PHP Vortex project - test APP_Base functionality. * * @package Vortex * @subpackage Debug * @author Thiago Ramon Gonçalves Montoya * @copyright Copyright 2004, Thiago Ramon Gonçalves Montoya * @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License */ /** Require the header for APP_Base functionality. */ require_once('../APP_Base.class.php'); /** Require the default configuration header. */ require_once('test_conf.php'); /** Require the global configuration file for access to the localized messages */ require_once('../conf/conf.php'); $app =& new APP_Base(array( 'pages' => array( 'test' => array( 'class' => 'SEC_EditTest', 'title' => 'APP_Base and SEC_Edit Test', 'style' => array('vortex_test_page.css') ) ), 'connection_class' => 'DB_MySQL', 'connection_opts' => $db_connection )); if (!isset($_REQUEST['page'])) { $app->Show('test'); } else { $app->Show($_REQUEST['page']); } ?> |