Changeset 23542 for branches/version-2_13-dev/tests/class
- Timestamp:
- 2014/06/11 13:42:24 (12 years ago)
- Location:
- branches/version-2_13-dev/tests/class/helper/SC_Helper_Address
- Files:
-
- 2 edited
-
SC_Helper_Address_deleteAddressTest.php (modified) (2 diffs)
-
SC_Helper_Address_getAddressTest.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/tests/class/helper/SC_Helper_Address/SC_Helper_Address_deleteAddressTest.php
r23294 r23542 13 13 parent::setUp(); 14 14 $this->objAddress = new SC_Helper_Address_Ex(); 15 $_SESSION['customer']['customer_id'] = 1; // 会員じゃないとテストが落ちる16 15 } 17 16 … … 27 26 $this->setUpAddress(); 28 27 $other_deliv_id = '1000'; 28 $customer_id = 1; 29 29 $this->expected = NULL; 30 $this->objAddress->deleteAddress($other_deliv_id );30 $this->objAddress->deleteAddress($other_deliv_id, $customer_id); 31 31 $objQuery =& SC_Query_Ex::getSingletonInstance(); 32 32 $select = '*'; 33 33 $from = 'dtb_other_deliv'; 34 $where = 'other_deliv_id = ? ';35 $whereVal = array($other_deliv_id );34 $where = 'other_deliv_id = ? AND customer_id = ?'; 35 $whereVal = array($other_deliv_id, $customer_id); 36 36 $this->actual = $objQuery->getRow($select, $from, $where, $whereVal); 37 37 38 38 $this->verify('登録配送先削除'); 39 39 } 40 41 public function testdeleteAddressTest_会員IDを設定しない場合_FALSEを返す() 42 { 43 $this->setUpAddress(); 44 $other_deliv_id = '1000'; 45 $this->expected = FALSE; 46 $this->actual = $this->objAddress->deleteAddress($other_deliv_id); 47 48 $this->verify('登録配送先削除'); 49 } 40 50 } -
branches/version-2_13-dev/tests/class/helper/SC_Helper_Address/SC_Helper_Address_getAddressTest.php
r23294 r23542 13 13 parent::setUp(); 14 14 $this->objAddress = new SC_Helper_Address_Ex(); 15 $_SESSION['customer']['customer_id'] = 1; // 会員じゃないとテストが落ちる16 15 } 17 16 … … 28 27 $this->setUpAddress(); 29 28 $other_deliv_id = '999'; 29 $customer_id = 1; 30 $this->expected = FALSE; 31 $this->actual = $this->objAddress->getAddress($other_deliv_id, $customer_id); 32 33 $this->verify('登録配送先取得'); 34 } 35 36 public function testgetAddressTest_会員IDを設定しない場合_FALSEを返す() 37 { 38 $this->setUpAddress(); 39 $other_deliv_id = '1001'; 30 40 $this->expected = FALSE; 31 41 $this->actual = $this->objAddress->getAddress($other_deliv_id); … … 38 48 $this->setUpAddress(); 39 49 $other_deliv_id = '1001'; 50 $customer_id = 1; 40 51 $this->expected = array( 41 52 'other_deliv_id' => '1001', … … 60 71 'zipcode' => null 61 72 ); 62 $this->actual = $this->objAddress->getAddress($other_deliv_id );73 $this->actual = $this->objAddress->getAddress($other_deliv_id, $customer_id); 63 74 64 75 $this->verify('登録配送先取得');
Note: See TracChangeset
for help on using the changeset viewer.
