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