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/AuthorizeNetTest.php

    r396 r468  
    3030 * Created with PHPUnit_Skeleton on 2005-08-09
    3131 */
    32 require_once 'PHPUnit.php';
    33 class AuthorizeNetTest extends PHPUnit_TestCase {
     32
     33class AuthorizeNetTest extends PHPUnit_Framework_TestCase {
    3434
    3535    var $AuthorizeNet;
    36 
    37     function AuthorizeNetTest($name)
    38     {
    39         $this->PHPUnit_TestCase($name);
    40     }
    41 
     36   
     37    static $shared_session;
     38   
    4239    function setUp()
    4340    {
     
    4542        require_once '../lib/AuthorizeNet.inc.php';
    4643
    47         $this->AuthorizeNet =& new AuthorizeNet();
     44        $this->AuthorizeNet = new AuthorizeNet();
    4845        $this->AuthorizeNet->setParam(array(
    4946            'x_login' => 'myaccount',
     
    6158            'x_zip' => '75010',
    6259        ));
     60        $_SESSION = AuthorizeNetTest::$shared_session;
    6361    }
    6462
     
    6664    {
    6765        unset($this->AuthorizeNet);
     66        AuthorizeNetTest::$shared_session = $_SESSION;
    6867    }
    6968
     
    7170    {
    7271        $this->AuthorizeNet->setparam(array('x_Login' => 'myaccount2'));
    73         $this->assertEquals('myaccount2', $this->AuthorizeNet->_params['x_Login']);
     72        $this->assertEquals('myaccount2', $this->AuthorizeNet->getParam('x_Login'));
    7473    }
    7574
     
    119118
    120119}
    121 // Running the test.
    122 $suite = new PHPUnit_TestSuite('AuthorizeNetTest');
    123 $result = PHPUnit::run($suite);
    124 echo $result->toString();
    125 ?>
Note: See TracChangeset for help on using the changeset viewer.