Changeset 468 for trunk/tests/PayPalTest.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/tests/PayPalTest.php
r396 r468 30 30 * Created with PHPUnit_Skeleton on 2005-08-09 31 31 */ 32 require_once 'PHPUnit.php'; 33 class PayPalTest extends PHPUnit_ TestCase {32 33 class PayPalTest extends PHPUnit_Framework_TestCase { 34 34 35 35 var $PayPal; 36 37 function PayPalTest($name)38 {39 $this->PHPUnit_TestCase($name);40 }41 36 42 37 function setUp() … … 44 39 require dirname(__FILE__) . '/_config.inc.php'; 45 40 require_once '../lib/PayPal.inc.php'; 46 $this->PayPal = &new PayPal();41 $this->PayPal = new PayPal(); 47 42 48 43 // Defaults for purchasing classified postings. … … 90 85 )); 91 86 $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)); 93 89 } 94 90 … … 103 99 $this->PayPal->printbutton('testitem'); 104 100 $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 106 104 } 107 105 … … 134 132 135 133 } 136 // Running the test.137 $suite = new PHPUnit_TestSuite('PayPalTest');138 $result = PHPUnit::run($suite);139 echo $result->toString();140 ?>
Note: See TracChangeset
for help on using the changeset viewer.