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