Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/DBSessionHandlerTest.php

    r396 r468  
    44 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    55 * Copyright 2001-2012 Strangecode, LLC
    6  * 
     6 *
    77 * This file is part of The Strangecode Codebase.
    88 *
     
    1111 * Free Software Foundation, either version 3 of the License, or (at your option)
    1212 * any later version.
    13  * 
     13 *
    1414 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1515 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1616 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1717 * details.
    18  * 
     18 *
    1919 * You should have received a copy of the GNU General Public License along with
    2020 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    3030 * Created with PHPUnit_Skeleton on 2005-08-09
    3131 */
    32 require_once 'PHPUnit.php';
    33 class DBSessionHandlerTest extends PHPUnit_TestCase {
     32
     33class DBSessionHandlerTest extends PHPUnit_Framework_TestCase {
    3434
    3535    var $DBSessionHandler;
    36 
    37     function DBSessionHandlerTest($name)
    38     {
    39         $this->PHPUnit_TestCase($name);
    40     }
    4136
    4237    function setUp()
     
    7368    function test_DBsessionwrite()
    7469    {
     70        if (!isset($_SESSION)) {
     71            $_SESSION = array();
     72        }
    7573        $this->DBSessionHandler->DBsessionwrite(session_id(), serialize($_SESSION));
    7674    }
     
    8785
    8886}
    89 // Running the test.
    90 $suite = new PHPUnit_TestSuite('DBSessionHandlerTest');
    91 $result = PHPUnit::run($suite);
    92 echo $result->toString();
    93 ?>
Note: See TracChangeset for help on using the changeset viewer.