Changeset 22796 for branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php
- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php
r22567 r22796 32 32 * @version $Id$ 33 33 */ 34 class SC_Helper_Purchase_sfUpdateOrderStatusTest extends SC_Helper_Purchase_TestBase 35 { 34 class SC_Helper_Purchase_sfUpdateOrderStatusTest extends SC_Helper_Purchase_TestBase { 36 35 37 36 private $helper; 38 37 39 protected function setUp() 40 { 38 protected function setUp() { 41 39 parent::setUp(); 42 40 $this->setUpOrder(); … … 45 43 } 46 44 47 protected function tearDown() 48 { 45 protected function tearDown() { 49 46 parent::tearDown(); 50 47 } … … 52 49 ///////////////////////////////////////// 53 50 // オプションの引数:対応状況、使用ポイント、加算ポイント 54 public function testSfUpdateOrderStatus_オプションの引数が未指定の場合_DBの値が引き継がれる() 55 { 51 public function testSfUpdateOrderStatus_オプションの引数が未指定の場合_DBの値が引き継がれる() { 56 52 $order_id = '1001'; 57 53 $old_update_date = $this->objQuery->get('update_date', 'dtb_order', 'order_id = ?', array($order_id)); … … 85 81 // TODO 定数を変更できないためテスト不可 86 82 /** 87 public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない() 88 { 83 public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない() { 89 84 90 85 … … 93 88 */ 94 89 95 public function testSfUpdateOrderStatus_対応状況が発送済みに変更された場合_発送日が更新される() 96 { 90 public function testSfUpdateOrderStatus_対応状況が発送済みに変更された場合_発送日が更新される() { 97 91 $order_id = '1001'; 98 92 $old_dates = $this->objQuery->select( … … 130 124 } 131 125 132 public function testSfUpdateOrderStatus_対応状況が入金済みに変更された場合_入金日が更新される() 133 { 126 public function testSfUpdateOrderStatus_対応状況が入金済みに変更された場合_入金日が更新される() { 134 127 $order_id = '1002'; 135 128 $old_dates = $this->objQuery->select( … … 162 155 } 163 156 164 public function testSfUpdateOrderStatus_変更前の対応状況が利用対象の場合_変更前の使用ポイントを戻す() 165 { 157 public function testSfUpdateOrderStatus_変更前の対応状況が利用対象の場合_変更前の使用ポイントを戻す() { 166 158 $order_id = '1002'; 167 159 $old_dates = $this->objQuery->select( … … 191 183 } 192 184 193 public function testSfUpdateOrderStatus_変更後の対応状況が利用対象の場合_変更後の使用ポイントを引く() 194 { 185 public function testSfUpdateOrderStatus_変更後の対応状況が利用対象の場合_変更後の使用ポイントを引く() { 195 186 $order_id = '1001'; 196 187 $old_dates = $this->objQuery->select( … … 219 210 } 220 211 221 public function testSfUpdateOrderStatus_変更前の対応状況が加算対象の場合_変更前の加算ポイントを戻す() 222 { 212 public function testSfUpdateOrderStatus_変更前の対応状況が加算対象の場合_変更前の加算ポイントを戻す() { 223 213 $order_id = '1002'; 224 214 $old_dates = $this->objQuery->select( … … 248 238 } 249 239 250 public function testSfUpdateOrderStatus_変更後の対応状況が加算対象の場合_変更後の加算ポイントを足す() 251 { 240 public function testSfUpdateOrderStatus_変更後の対応状況が加算対象の場合_変更後の加算ポイントを足す() { 252 241 $order_id = '1001'; 253 242 $old_dates = $this->objQuery->select( … … 276 265 } 277 266 278 public function testSfUpdateOrderStatus_加算ポイントがプラスの場合_会員テーブルが更新される() 279 { 267 public function testSfUpdateOrderStatus_加算ポイントがプラスの場合_会員テーブルが更新される() { 280 268 $order_id = '1001'; 281 269 $old_dates = $this->objQuery->select( … … 306 294 } 307 295 308 public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りている場合_会員テーブルが更新される() 309 { 296 public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りている場合_会員テーブルが更新される() { 310 297 $order_id = '1001'; 311 298 $old_dates = $this->objQuery->select( … … 338 325 // TODO ロールバックされる場合はexitするためテスト不可. 339 326 /** 340 public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる() 341 { 327 public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる() { 342 328 } 343 329 */ … … 345 331 ////////////////////////////////////////// 346 332 347 function assertUpdate($new_dates, $old_dates, $key, $message, $is_update = true) 348 { 333 function assertUpdate($new_dates, $old_dates, $key, $message, $is_update = true) { 349 334 $new_date = $new_dates[0][$key]; 350 335 $old_date = $old_dates[0][$key]; … … 360 345 } 361 346 362 class SC_Helper_Purchase_sfUpdateOrderStatusMock extends SC_Helper_Purchase 363 { 347 class SC_Helper_Purchase_sfUpdateOrderStatusMock extends SC_Helper_Purchase { 364 348 365 349 var $usePoint; 366 350 var $addPoint; 367 351 368 function isUsePoint($status) 369 { 352 function isUsePoint($status) { 370 353 if (is_null($this->usePoint)) { 371 354 return parent::isUsePoint($status); … … 374 357 } 375 358 376 function isAddPoint($status) 377 { 359 function isAddPoint($status) { 378 360 if (is_null($this->addPoint)) { 379 361 return parent::isAddPoint($status);
Note: See TracChangeset
for help on using the changeset viewer.