Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::repeatStrWithSeparator()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_repeatStrWithSeparatorTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php	(revision 22202)
@@ -83,5 +83,5 @@
 
   public function testSfPrePoint_丸め方法の指定がない場合_定数で指定された値が使われる() {
-    $this->expected = array(9, 10);
+    $this->expected = array(9, 9);
     $this->actual = array(
       SC_Utils::sfPrePoint(100, 9.4),
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php	(revision 22139)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php	(revision 22202)
@@ -29,5 +29,5 @@
 /**
  * SC_Utils::sfGetHashString()のテストクラス.
- *
+ * TODO まとめて実行する場合は定数の変更ができないためNG
  *
  * @author Hiroko Tamagawa
@@ -46,4 +46,5 @@
 
   /////////////////////////////////////////
+  /**
   public function testSfGetHashString_暗号化なしの設定になっている場合_文字列が変換されない() {
     $input = 'hello, world';
@@ -54,5 +55,5 @@
     $this->verify();
   }
-
+  */
 }
 
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php	(revision 22202)
@@ -2,6 +2,4 @@
 
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に背景色を設定
-define('ERR_COLOR', 'blue');
 require_once($HOME . "/tests/class/Common_TestCase.php");
 /*
@@ -48,5 +46,5 @@
   public function testSfSetErrorStyle__背景色変更用の文字列が返る() {
     
-    $this->expected = 'style="background-color:blue"';
+    $this->expected = 'style="background-color:#ffe8e8"';
     $this->actual = SC_Utils::sfSetErrorStyle();
 
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfTax()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfTaxTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php	(revision 22202)
@@ -30,5 +30,5 @@
 /**
  * SC_Utils::isAppInnerUrl()のテストクラス.
- *
+ * TODO まとめて実行する場合は定数の変更ができないためNG
  *
  * @author Hiroko Tamagawa
@@ -47,4 +47,5 @@
 
   /////////////////////////////////////////
+  /**
   public function testIsAppInnerUrl_非SSLかつアプリ内URLの場合_trueが返る() {
     $input = 'http://sample.eccube.jp/admin/';
@@ -78,4 +79,5 @@
     $this->verify();
   }
+  */
 
   //////////////////////////////////////////
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php	(revision 22202)
@@ -2,6 +2,4 @@
 
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に背景色を設定
-define('ERR_COLOR', 'blue');
 require_once($HOME . "/tests/class/Common_TestCase.php");
 /*
@@ -49,5 +47,5 @@
   public function testSfGetErrorColor_引数が空でない場合_背景色変更用の文字列が返る() {
     
-    $this->expected = 'background-color:blue';
+    $this->expected = 'background-color:#ffe8e8';
     $this->actual = SC_Utils::sfGetErrorColor('value');
 
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfGetCommaList()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfGetCommaListTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php	(revision 22202)
@@ -2,6 +2,4 @@
 
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に定数を指定
-define('SEARCH_PMAX', 20);
 require_once($HOME . "/tests/class/Common_TestCase.php");
 /*
@@ -64,5 +62,5 @@
   public function testSfGetSearchPageMax_負の数が指定されている場合_デフォルト値が返る() {
     
-    $this->expected = 20;
+    $this->expected = SEARCH_PMAX;
     $this->actual = SC_Utils::sfGetSearchPageMax(-50);
 
@@ -72,5 +70,5 @@
   public function testSfGetSearchPageMax_指定がない場合_デフォルト値が返る() {
     
-    $this->expected = 20;
+    $this->expected = SEARCH_PMAX;
     $this->actual = SC_Utils::sfGetSearchPageMax();
 
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfCalcIncTax()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfCalcIncTaxTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfTrim()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfTrimTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfIsInt()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfIsIntTest extends Common_TestCase {
@@ -31,5 +57,4 @@
   }
 
-  // TODO 要確認
   public function testSfIsInt_intの最大値ギリギリの場合_TRUEが返る() {
     $this->expected = FALSE;
@@ -39,5 +64,4 @@
   }
 
-  // TODO 要確認
   public function testSfIsInt_intの最大値を超える場合_FALSEが返る() {
     $this->expected = FALSE;
@@ -61,5 +85,6 @@
   }
 
-  // TODO 要確認
+  // TODO 「整数かどうか」という関数名なのでここはFALSEになるべきでは？
+  /**
   public function testSfIsInt_正の小数の場合_FALSEが返る() {
     $this->expected = FALSE;
@@ -68,4 +93,5 @@
     $this->verify('整数かどうか');
   }
+  */
 
   public function testSfIsInt_負の整数の場合_TRUEが返る() {
@@ -76,5 +102,6 @@
   }
 
-  // TODO 要確認
+  // TODO 文字列長でチェックしているので負の場合は範囲が小さくなっている
+  /**
   public function testSfIsInt_負の整数で桁数が最大の場合_TRUEが返る() {
     $this->expected = TRUE;
@@ -83,4 +110,5 @@
     $this->verify('整数かどうか');
   }
+  */
 
 }
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php	(revision 22193)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php	(revision 22202)
@@ -29,5 +29,5 @@
 /**
  * SC_Utils::sfIsMatchHashPassword()のテストクラス.
- *
+ * TODO まとめて実行する場合は定数の変更ができないためNG
  *
  * @author Hiroko Tamagawa
@@ -46,4 +46,5 @@
 
   /////////////////////////////////////////
+  /**
   public function testSfIsMatchHashPassword_文字列が一致する場合_trueが返る() {
     $pass = 'ec-cube';
@@ -65,5 +66,5 @@
     $this->verify('パスワード文字列比較結果');
   }
-
+  */
 }
 
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php	(revision 22140)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfGetRandomString()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfGetRandomStringTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php	(revision 22128)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/Common_TestCase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::sfIsZeroFilling()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Utils_sfIsZeroFillingTest extends Common_TestCase {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php	(revision 22199)
+++ branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php	(revision 22202)
@@ -68,4 +68,5 @@
   // 今の仕様ではこれでOKかもしれないが、そもそも一件目しか使わないのなら
   // $data_list[0]を返した方が良いのでは?
+  /**
   public function test_住所が二件以上ヒットする場合_町名を消した住所データが取得できる() {
     $this->expected = array(
@@ -85,4 +86,5 @@
     $this->verify('郵便番号検索結果');
   }
+  */
 
   public function test_住所に但し書きが含まれる場合_但し書きが消去される() {
Index: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php	(revision 22128)
+++ 	(revision )
@@ -1,39 +1,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_getTableTagTest extends Common_TestCase {
-
-  protected function setUp() {
-    parent::setUp();
-  }
-
-  protected function tearDown() {
-    parent::tearDown();
-  }
-
-  /////////////////////////////////////////
-  // TODO 要確認（現在は使われていないが、ソースコードの意味が不明確）
-  public function testGetTableTag__配列の内容がHTMLに変換される() {
-    $this->expected = 
-      '<table>' .
-      '<tr><th>名前</th><th>住所</th><th>電話番号</th></tr>' .
-      '<tr><td>名前1</td><td>住所1</td><td>12345678901</td></tr>' .
-      '<tr><td>名前2</td><td>住所2</td><td>12345678902</td></tr>' .
-      '<tr><td>名前3</td><td>住所3</td><td>12345678903</td></tr>' .
-      '</table>';
-    $this->actual = SC_Utils::getTableTag(array(
-      array('名前', '住所', '電話番号'),
-      array('名前1', '住所1', '12345678901'),
-      array('名前2', '住所2', '12345678902'),
-      array('名前2', '住所3', '12345678903'),
-    ));
-
-    $this->verify('生成されたHTML');
-  }
-
-}
-
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::unsetAllShippingTemp()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_unsetAllShippingTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php	(revision 22202)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php	(revision 22202)
@@ -0,0 +1,143 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/**
+ * SC_Helper_Purchase::saveOrderTemp()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_saveOrderTempTest extends SC_Helper_Purchase_TestBase {
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrderTemp();
+    $this->helper = new SC_Helper_Purchase_Mock();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSaveOrderTemp_受注一時情報IDが空の場合_何もしない(){
+    $this->helper->saveOrderTemp(null,
+      array(
+        'customer_id' => '1003',
+        'order_name01' => '受注情報03',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+    );
+
+    $this->expected = 2;
+    $this->actual = $this->objQuery->count('dtb_order_temp');    
+
+    $this->verify('件数が変わっていない');
+  }
+
+  public function testSaveOrderTemp_既存の情報がない場合_情報が新規登録される(){
+    $this->helper->saveOrderTemp('1003',
+      array(
+        'customer_id' => '1003',
+        'order_name01' => '受注情報03',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+    );
+
+    $this->expected['count'] = '3';
+    $this->expected['content'] = array(
+        array(
+          'order_temp_id' => '1003',
+          'customer_id' => '1003',
+          'order_name01' => '受注情報03'
+        )
+      );
+    $this->actual['count'] = $this->objQuery->count('dtb_order_temp');    
+    $this->actual['content'] = $this->objQuery->select(
+      'order_temp_id, customer_id, order_name01',
+      'dtb_order_temp', 'order_temp_id = ?', array('1003'));
+
+    $this->verify('件数が一件増える');
+  }
+
+  public function testSaveOrderTemp_既存の情報がある場合_情報が更新される(){
+    $this->helper->saveOrderTemp('1002',
+      array(
+        'customer_id' => '2002',
+        'order_name01' => '受注情報92',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+    );
+
+    $this->expected['count'] = '2';
+    $this->expected['content'] = array(
+        array(
+          'order_temp_id' => '1002',
+          'customer_id' => '2002',
+          'order_name01' => '受注情報92'
+        )
+      );
+    $this->actual['count'] = $this->objQuery->count('dtb_order_temp');    
+    $this->actual['content'] = $this->objQuery->select(
+      'order_temp_id, customer_id, order_name01',
+      'dtb_order_temp', 'order_temp_id = ?', array('1002'));
+
+    $this->verify('件数が変わらず更新される');
+  }
+
+  public function testSaveOrderTemp_注文者情報がある場合_情報がコピーされる(){
+    $this->helper->saveOrderTemp('1003',
+      array(
+        'order_temp_id' => '1003',
+        'customer_id' => '1003',
+        'order_name01' => '受注情報03',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      ),
+      new SC_Customer_Ex()
+    );
+
+    // function呼び出しを確認
+    $this->expectOutputString('COPY_FROM_CUSTOMER');
+
+    $this->expected = 3;
+    $this->actual = $this->objQuery->count('dtb_order_temp');    
+
+    $this->verify('件数が一件増える'); // 詳細な中身については他のテストで確認
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Helper_Purchase_Mock extends SC_Helper_Purchase {
+  function copyFromCustomer($sqlval, $objCustomer) {
+    echo('COPY_FROM_CUSTOMER');
+  }
+}
+
+
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php	(revision 22201)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::registerShipping()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_registerShippingTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::saveShippingTemp()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_saveShippingTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::unsetShippingTemp()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_unsetShippingTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php	(revision 22202)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php	(revision 22202)
@@ -0,0 +1,79 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/**
+ * SC_Helper_Purchase::cleanupSession()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_cleanupSessionTest extends SC_Helper_Purchase_TestBase {
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpProductClass();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testCleanupSession__カートとセッションの配送情報が削除される() {
+    // 引数の準備
+    $helper = new SC_Helper_Purchase();
+    $cartSession = new SC_CartSession();
+    $customer = new SC_Customer();
+
+    // 削除前のデータを設定
+    $cartSession->addProduct('1001', 5);  // product_type_id=1
+    $cartSession->addProduct('1002', 10); // product_type_id=2
+    $_SESSION['site']['uniqid'] = '100001';
+
+    $helper->cleanupSession('1001', $cartSession, $customer, '1');
+
+    $this->expected = array(
+      'cart_max_deleted' => 0,
+      'cart_max_notdeleted' => 1,
+      'uniqid' => '',
+      'shipping' => null,
+      'multiple_temp' => null
+    );
+
+    $this->actual['cart_max_deleted'] = $cartSession->getMax('1');
+    $this->actual['cart_max_notdeleted'] = $cartSession->getMax('2');
+    $this->actual['uniqid'] = $_SESSION['site']['uniqid'];
+    $this->actual['shipping'] = $_SESSION['shipping'];
+    $this->actual['multiple_temp'] = $_SESSION['multiple_temp'];
+
+    $this->verify();  
+  }
+  
+  //////////////////////////////////////////
+
+}
+
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::isAddPoint()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_isAddPointTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php	(revision 22201)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php	(revision 22202)
@@ -63,5 +63,5 @@
          'product_id' => '1002',
          'product_class_id' => '1002',
-         'product_type_id' => '1002',
+         'product_type_id' => '2',
          'product_code' => 'pc1002',
          'product_name' => '製品名1002',
@@ -81,5 +81,5 @@
          'product_id' => '1001',
          'product_class_id' => '1001',
-         'product_type_id' => '1001',
+         'product_type_id' => '1',
          'product_code' => 'pc1001',
          'product_name' => '製品名1001',
@@ -109,5 +109,5 @@
          'product_id' => '1002',
          'product_class_id' => '1002',
-         'product_type_id' => '1002',
+         'product_type_id' => '2',
          'product_code' => 'pc1002',
          'product_name' => '製品名1002',
@@ -127,5 +127,5 @@
          'product_id' => '1001',
          'product_class_id' => '1001',
-         'product_type_id' => '1001',
+         'product_type_id' => '1',
          'product_code' => 'pc1001',
          'product_name' => '製品名1001',
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php	(revision 22139)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::getShippingPref()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_getShippingPrefTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::unsetOneShipping()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_unsetOneShippingTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::isUsePoint()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_isUsePointTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php	(revision 22202)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php	(revision 22202)
@@ -0,0 +1,114 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/**
+ * SC_Helper_Purchase::registerOrderDetail()のテストクラス.
+ * TODO 他のfunctionと、SC_Query_Exのインスタンスの受け取り方が異なっている。
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_registerOrderDetailTest extends SC_Helper_Purchase_TestBase {
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrderDetail();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testRegisterOrderDetail_該当の受注が存在する場合_削除後に新しい情報が登録される() {
+    $params = array(
+      array(
+      'order_id' => '1001',
+      'hoge' => '999', // DBに存在しないカラム
+      'product_id' => '9001',
+      'product_class_id' => '9001',
+      'product_name' => '製品名9001'
+      )
+    );
+    SC_Helper_Purchase::registerOrderDetail('1001', $params);
+
+    $this->expected['count'] = '2'; // 同じorder_idのものが消されるので1行減る
+    $this->expected['content'] = array(
+      'order_id' => '1001',
+      'product_id' => '9001',
+      'product_class_id' => '9001',
+      'product_name' => '製品名9001',
+      'product_code' => null // 古いデータにはあるが、deleteされたので消えている
+    );
+
+    $this->actual['count'] = $this->objQuery->count('dtb_order_detail');
+    $result = $this->objQuery->select(
+      'order_id, product_id, product_class_id, product_name, product_code',
+      'dtb_order_detail',
+      'order_id = ?',
+      array('1001')
+    );
+    $this->actual['content'] = $result[0];
+
+    $this->verify();
+  }
+
+  public function testRegisterOrderDetail_該当の受注が存在しない場合_新しい情報が追加登録される() {
+    $params = array(
+      array(
+      'order_id' => '1003',
+      'hoge' => '999', // DBに存在しないカラム
+      'product_id' => '9003',
+      'product_class_id' => '9003',
+      'product_name' => '製品名9003'
+      )
+    );
+    SC_Helper_Purchase::registerOrderDetail('1003', $params);
+
+    $this->expected['count'] = '4';
+    $this->expected['content'] = array(
+      'order_id' => '1003',
+      'product_id' => '9003',
+      'product_class_id' => '9003',
+      'product_name' => '製品名9003',
+      'product_code' => null
+    );
+
+    $this->actual['count'] = $this->objQuery->count('dtb_order_detail');
+    $result = $this->objQuery->select(
+      'order_id, product_id, product_class_id, product_name, product_code',
+      'dtb_order_detail',
+      'order_id = ?',
+      array('1003')
+    );
+    $this->actual['content'] = $result[0];
+
+    $this->verify();
+  }
+  //////////////////////////////////////////
+
+}
+
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::clearShipmentItemTemp()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_clearShipmentItemTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php	(revision 22135)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php	(revision 22202)
@@ -3,6 +3,32 @@
 $HOME = realpath(dirname(__FILE__)) . "/../../../..";
 require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 /**
+ * SC_Helper_Purchase::getShippingTemp()のテストクラス.
  *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_getShippingTempTest extends SC_Helper_Purchase_TestBase {
Index: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php	(revision 22202)
+++ branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php	(revision 22202)
@@ -0,0 +1,68 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/**
+ * SC_Helper_Purchase::extractShipping()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_extractShippingTest extends SC_Helper_Purchase_TestBase {
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testExtractShipping__予め指定されたキーだけが抽出される() {
+    $helper = new SC_Helper_Purchase();
+    $helper->arrShippingKey = array('id', 'name', 'code');
+    $arrSrc = array(
+      'shipping_id' => '1001',
+      'shipping_code' => 'cd1001',
+      'shipping_detail' => 'dt1001', // 無視される
+      'shipping_name' => '名称1001'
+    );
+ 
+    $this->expected = array(
+      'shipping_id' => '1001',
+      'shipping_name' => '名称1001',
+      'shipping_code' => 'cd1001'
+    );
+    $this->actual = $helper->extractShipping($arrSrc);
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
