Changeset 20467 for branches/version-2_5-dev/test
- Timestamp:
- 2011/03/03 12:02:18 (15 years ago)
- bzr:base-revision:
- [email protected]
- bzr:committer:
- Kentaro Ohkouchi <[email protected]>
- bzr:file-ids:
data/class/pages/shopping/LC_Page_Shopping_Confirm.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Confirm.php
data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php lc_page_shopping_loa-20101025071457-rpmc2g2y1ik9lyow-1
data/class/pages/upgrade/helper/LC_Upgrade_Helper_Json.php 16839@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fupgrade%2Fhelper%2FLC_Upgrade_Helper_Json.php
test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php lc_page_shopping_loa-20101025071501-16934ygv2y12gz92-1- bzr:mapping-version:
- v4
- bzr:merge:
[email protected]- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- [email protected]
- bzr:revno:
- 3194
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:text-revisions:
data/class/pages/shopping/LC_Page_Shopping_Confirm.php [email protected]
data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php [email protected]
test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php [email protected]- bzr:timestamp:
- 2011-03-03 12:02:14.236999989 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-03-03T03:02:14.237000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
r20116 r20467 46 46 } 47 47 48 function testGet PaymentIdBySession() {49 $_SESSION[' payment_id'] = 1;50 $_GET[' payment_id'] = 2;51 $_POST[' payment_id'] = 3;48 function testGetOrderIdBySession() { 49 $_SESSION['order_id'] = 1; 50 $_GET['order_id'] = 2; 51 $_POST['order_id'] = 3; 52 52 53 $this->expected = $_SESSION[' payment_id'];54 $this->actual = $this->objPage->get PaymentId();53 $this->expected = $_SESSION['order_id']; 54 $this->actual = $this->objPage->getOrderId(); 55 55 56 56 $this->verify(); 57 57 } 58 58 59 function testGet PaymentIdByPOST() {60 $_GET[' payment_id'] = 1;61 $_POST[' payment_id'] = 1;59 function testGetOrderIdByPOST() { 60 $_GET['order_id'] = 1; 61 $_POST['order_id'] = 1; 62 62 63 $this->expected = $_POST[' payment_id'];64 $this->actual = $this->objPage->get PaymentId();63 $this->expected = $_POST['order_id']; 64 $this->actual = $this->objPage->getOrderId(); 65 65 66 66 $this->verify(); 67 67 } 68 68 69 function testGet PaymentIdByGET() {70 $_GET[' payment_id'] = 2;69 function testGetOrderIdByGET() { 70 $_GET['order_id'] = 2; 71 71 72 $this->expected = $_GET[' payment_id'];73 $this->actual = $this->objPage->get PaymentId();72 $this->expected = $_GET['order_id']; 73 $this->actual = $this->objPage->getOrderId(); 74 74 75 75 $this->verify(); 76 76 } 77 77 78 function testGet PaymentIdIsNull() {79 $this->assertFalse($this->objPage->get PaymentId());78 function testGetOrderIdIsNull() { 79 $this->assertFalse($this->objPage->getOrderId()); 80 80 } 81 81 82 82 function testGetModulePath() { 83 $order_id = 10000; 83 84 $payment_id = 10000; 84 85 $module_path = __FILE__; 85 $this->setPayment($ payment_id, $module_path);86 $this->setPayment($order_id, $payment_id, $module_path); 86 87 87 88 $this->expected = __FILE__; 88 $this->actual = $this->objPage->getModulePath($ payment_id);89 $this->actual = $this->objPage->getModulePath($order_id); 89 90 90 91 $this->verify(); … … 92 93 93 94 function testGetModulePathIsFailure() { 95 $order_id = 10000; 94 96 $payment_id = 10000; 95 97 $module_path = "aaa"; 96 $this->setPayment($ payment_id, $module_path);98 $this->setPayment($order_id, $payment_id, $module_path); 97 99 98 $this->actual = $this->objPage->getModulePath($ payment_id);100 $this->actual = $this->objPage->getModulePath($order_id); 99 101 100 102 $this->assertFalse($this->actual); … … 106 108 } 107 109 108 function setPayment($payment_id, $module_path) { 109 $this->objQuery->insert("dtb_payment", array('payment_id' => $payment_id, 110 function setPayment($order_id, $payment_id, $module_path) { 111 $this->objQuery->insert('dtb_order', array('order_id' => $order_id, 112 'customer_id' => (int) 0, 113 'payment_id' => $payment_id, 114 'create_date' => 'now()', 115 'update_date' => 'now()')); 116 117 $this->objQuery->insert("dtb_payment", array('payment_id' => $order_id, 110 118 'module_path' => $module_path, 111 'creator_id' => 1)); 119 'creator_id' => 1, 120 'create_date' => 'now()', 121 'update_date' => 'now()')); 112 122 } 113 123 }
Note: See TracChangeset
for help on using the changeset viewer.
