[PHPVortex-Commit] phpvortex/test vortex_test.php,1.1,1.2
Brought to you by:
nop144666
From: Thiago R. <nop...@us...> - 2004-10-01 20:54:52
|
Update of /cvsroot/phpvortex/phpvortex/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29294/test Modified Files: vortex_test.php Log Message: Added a call to test TB_Base::ShowList() Index: vortex_test.php =================================================================== RCS file: /cvsroot/phpvortex/phpvortex/test/vortex_test.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vortex_test.php 30 Sep 2004 20:46:54 -0000 1.1 --- vortex_test.php 1 Oct 2004 20:53:11 -0000 1.2 *************** *** 18,21 **** --- 18,24 ---- $this->fields['ph_name'] =& new FT_Text($db, array('name' => 'ph_name')); $this->fields['ph_phone'] =& new FT_Text($db, array('name' => 'ph_phone')); + $this->fields_list[] =& $this->fields['ph_name']; + $this->fields_list[] =& $this->fields['ph_phone']; + $this->list_order = 'ph_name'; TB_Base::TB_Base($db); } *************** *** 25,33 **** $db->Connect(); $tb =& new TB_Teste($db); ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); echo 'Added ID:'.$id.'<br>'; ! $tb->Seek(array('ph_name' => 'Test'), FALSE) or print('Error(Seek): '.$tb->Error()); echo 'Seek ID:'.$tb->data['ph_id'].'<br>'; ! d('Snapshot', $tb); $tb->Delete() or print('Error(Delete): '.$tb->Error()); echo 'Deleted<br>'; --- 28,40 ---- $db->Connect(); $tb =& new TB_Teste($db); ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 1', 'ph_phone' => '555-5551')) or print('Error(Save): '.$tb->Error()); echo 'Added ID:'.$id.'<br>'; ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 2', 'ph_phone' => '555-5552')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id.'<br>'; ! $id = $tb->Save(array('ph_id' => '-1', 'ph_name' => 'Test 3', 'ph_phone' => '555-5553')) or print('Error(Save): '.$tb->Error()); ! echo 'Added ID:'.$id.'<br>'; ! $tb->Seek(array('ph_name' => 'Test 3'), FALSE) or print('Error(Seek): '.$tb->Error()); echo 'Seek ID:'.$tb->data['ph_id'].'<br>'; ! $tb->ShowList(); $tb->Delete() or print('Error(Delete): '.$tb->Error()); echo 'Deleted<br>'; |