Ignore:
Timestamp:
Dec 6, 2013 7:17:37 PM (11 years ago)
Author:
anonymous
Message:

phpunit tests now work with phpunit 3.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eli_branch/tests/PayPalTest.php

    r438 r442  
    3030 * Created with PHPUnit_Skeleton on 2005-08-09
    3131 */
    32 require_once 'PHPUnit.php';
    33 class PayPalTest extends PHPUnit_TestCase {
     32
     33class PayPalTest extends PHPUnit_Framework_TestCase {
    3434
    3535    var $PayPal;
    36 
    37     function PayPalTest($name)
    38     {
    39         $this->PHPUnit_TestCase($name);
    40     }
    4136
    4237    function setUp()
     
    4439        require dirname(__FILE__) . '/_config.inc.php';
    4540        require_once '../lib/PayPal.inc.php';
    46         $this->PayPal =& new PayPal();
     41        $this->PayPal = new PayPal();
    4742
    4843        // Defaults for purchasing classified postings.
     
    9085        ));
    9186        $result = $this->PayPal->getlink('testitem');
    92         $this->assertTrue(preg_match('/customdata/', $result));
     87        //$this->assertTrue(preg_match('/customdata/', $result));
     88        $this->assertSame(1, preg_match('/customdata/', $result));
    9389    }
    9490
     
    10399        $this->PayPal->printbutton('testitem');
    104100        $result = ob_get_clean();
    105         $this->assertTrue(preg_match('/customdata/', $result));
     101        //$this->assertTrue(preg_match('/customdata/', $result));
     102        $this->assertSame(1, preg_match('/customdata/', $result));
     103       
    106104    }
    107105
     
    134132
    135133}
    136 // Running the test.
    137 $suite = new PHPUnit_TestSuite('PayPalTest');
    138 $result = PHPUnit::run($suite);
    139 echo $result->toString();
Note: See TracChangeset for help on using the changeset viewer.