Changeset 22567 for branches/version-2_12-dev/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
- Timestamp:
- 2013/02/18 19:09:54 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
r22206 r22567 33 33 * @version $Id$ 34 34 */ 35 class LC_Page_Shopping_LoadPaymentModule_Test extends PHPUnit_Framework_TestCase { 35 class LC_Page_Shopping_LoadPaymentModule_Test extends PHPUnit_Framework_TestCase 36 { 36 37 37 function setUp() { 38 function setUp() 39 { 38 40 $this->objQuery =& SC_Query::getSingletonInstance(); 39 41 $this->objQuery->begin(); … … 41 43 } 42 44 43 function tearDown() { 45 function tearDown() 46 { 44 47 $this->objQuery->rollback(); 45 48 $this->objPage = null; 46 49 } 47 50 48 function testGetOrderIdBySession() { 51 function testGetOrderIdBySession() 52 { 49 53 $_SESSION['order_id'] = 1; 50 54 $_GET['order_id'] = 2; … … 57 61 } 58 62 59 function testGetOrderIdByPOST() { 63 function testGetOrderIdByPOST() 64 { 60 65 $_GET['order_id'] = 1; 61 66 $_POST['order_id'] = 1; … … 67 72 } 68 73 69 function testGetOrderIdByGET() { 74 function testGetOrderIdByGET() 75 { 70 76 $_GET['order_id'] = 2; 71 77 … … 76 82 } 77 83 78 function testGetOrderIdIsNull() { 84 function testGetOrderIdIsNull() 85 { 79 86 $this->assertFalse($this->objPage->getOrderId()); 80 87 } 81 88 82 function testGetModulePath() { 89 function testGetModulePath() 90 { 83 91 $order_id = 10000; 84 92 $payment_id = 10000; … … 92 100 } 93 101 94 function testGetModulePathIsFailure() { 102 function testGetModulePathIsFailure() 103 { 95 104 $order_id = 10000; 96 105 $payment_id = 10000; … … 104 113 } 105 114 106 function verify() { 115 function verify() 116 { 107 117 $this->assertEquals($this->expected, $this->actual); 108 118 } 109 119 110 function setPayment($order_id, $payment_id, $module_path) { 120 function setPayment($order_id, $payment_id, $module_path) 121 { 111 122 $this->objQuery->insert('dtb_order', array('order_id' => $order_id, 112 123 'customer_id' => (int) 0,
Note: See TracChangeset
for help on using the changeset viewer.