home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / UnitTest.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  916 b   |  39 lines

  1. <?php
  2. //
  3. //  $Id: UnitTest.php,v 1.2 2004/03/19 01:11:49 quipo Exp $
  4. //
  5.  
  6. class tests_UnitTest extends PhpUnit_TestCase
  7. {
  8.     function setUp()
  9.     {
  10.         foreach ($GLOBALS['allTables'] as $aTable) {
  11.             $tableObj = new tests_Common($aTable);
  12.             $tableObj->removeAll();
  13.         }
  14.  
  15.         $this->setLooselyTyped(true);
  16.     }
  17.  
  18.     function tearDown()
  19.     {
  20. /*        global $dbStructure;
  21.  
  22.         $querytool = new Common();
  23.         foreach ($dbStructure[$querytool->db->phptype]['tearDown'] as $aQuery) {
  24. //print "$aQuery<br><br>";
  25.             if (DB::isError($ret=$querytool->db->query($aQuery))) {
  26.                 die($ret->getUserInfo());
  27.             }
  28.         }
  29. */
  30.     }
  31.  
  32.     function assertStringEquals($expected,$actual,$msg='')
  33.     {
  34.         $expected = '~^\s*'.preg_replace('~\s+~','\s*',trim(preg_quote($expected))).'\s*$~i';
  35.         $this->assertRegExp($expected,$actual,$msg);
  36.     }
  37.  
  38. }
  39. ?>