[PHPVortex-Commit] phpvortex/test vortex_test.php,1.4,1.5
Brought to you by:
nop144666
From: Thiago R. <nop...@us...> - 2004-10-04 18:31:15
|
Update of /cvsroot/phpvortex/phpvortex/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28912/test Modified Files: vortex_test.php Log Message: Updating documentation Index: vortex_test.php =================================================================== RCS file: /cvsroot/phpvortex/phpvortex/test/vortex_test.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** vortex_test.php 4 Oct 2004 18:15:46 -0000 1.4 --- vortex_test.php 4 Oct 2004 18:29:45 -0000 1.5 *************** *** 1,5 **** --- 1,18 ---- <?php + /** + * Test file for the PHP Vortex project. + * + * @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 MySQL database access. */ require_once('../DB_MySQL.class.php'); + /** Require the header for Table functionality. */ require_once('../TB_Base.class.php'); + /** Require the header for the field used in the test database. */ require_once('../FT_Text.class.php'); ?> *************** *** 14,19 **** <body> <?php ! class TB_Teste extends TB_Base { ! function TB_Teste(&$db) { $this->name = 'phones'; $this->fields['ph_id'] =& new FT_Text($db, array('name' => 'ph_id', 'pkey' => TRUE, 'required' => TRUE)); --- 27,38 ---- <body> <?php ! /** ! * Testing class. ! * ! * @package Vortex ! * @subpackage Debug ! */ ! class TB_Test extends TB_Base { ! function TB_Test(&$db) { $this->name = 'phones'; $this->fields['ph_id'] =& new FT_Text($db, array('name' => 'ph_id', 'pkey' => TRUE, 'required' => TRUE)); *************** *** 29,33 **** $db =& new DB_MySQL(array('server' => 'localhost', 'db' => 'vortex_test', 'user' => 'root', 'pw' => '')); $db->Connect(); ! $tb =& new TB_Teste($db); $id1 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 1', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); echo 'Added ID:'.$id1.'<br>'; --- 48,52 ---- $db =& new DB_MySQL(array('server' => 'localhost', 'db' => 'vortex_test', 'user' => 'root', 'pw' => '')); $db->Connect(); ! $tb =& new TB_Test($db); $id1 = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 1', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); echo 'Added ID:'.$id1.'<br>'; |