Index: /branches/version-2_12-multilang/build.xml
===================================================================
--- /branches/version-2_12-multilang/build.xml	(revision 22144)
+++ /branches/version-2_12-multilang/build.xml	(revision 22278)
@@ -16,4 +16,6 @@
     <mkdir dir="reports/coverage" />
     <exec dir="."
+      output="reports/stdout.log"
+      error="reports/stderr.log"
       command="phpunit --log-tap reports/tap.log
                --log-junit reports/unitreport.xml
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getYearTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getYearTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getYearTest.php	(revision 22187)
@@ -0,0 +1,106 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getYearTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+  
+    public function testGetYear_要素の数が4の配列を返す() {
+        $this->expected = 4;
+        $this->actual = count($this->objDate->getYear());
+
+        $this->verify("配列の長さ");
+    }
+    
+    public function testGetYear_最小値が今年の配列を返す() {
+        $this->expected = DATE('Y');
+        $this->actual = min($this->objDate->getYear());
+
+        $this->verify("最小値；今年");
+    }
+    
+    public function testGetYear_最低値が引数の年の配列を返す() {
+        $this->expected = '2007';
+        $this->actual = min($this->objDate->getYear('2007'));
+
+        $this->verify("引数が最低値");
+    }
+    
+    public function testGetYear_最低値がメンバー変数の年の配列を返す() {
+        $this->expected = '2004';
+        $this->objDate->setStartYear('2004');
+        $this->actual = min($this->objDate->getYear());
+
+        $this->verify("メンバー変数が最低値");
+    }
+    
+    public function testGetYear_最大値が3年後の配列を返す() {
+        $this->expected = DATE('Y')+3;
+        $this->actual = max($this->objDate->getYear());
+
+        $this->verify("最大値；3年後");
+    }
+    
+    public function testGetYear_最大値がメンバ変数の配列を返す() {
+        $this->expected = '2020';
+        $this->objDate->setEndYear('2020');
+        $this->actual = max($this->objDate->getYear());
+
+        $this->verify("メンバー変数が最大値");
+    }
+    
+    public function testGetYear_デフォルト値が含まれる配列を返す() {
+        $result = in_array('----', $this->objDate->getYear(DATE('Y'), TRUE));
+        $this->assertTrue($result, "デフォルト値");
+    }
+    
+    public function testGetYear_デフォルト値の引数に年を指定した配列を返す() {
+        $year = date('Y');
+        $this->expected = array( $year => $year, $year+1 => $year+1
+                               , '----' => '----'
+                               , $year+2 => $year+2, $year+3 => $year+3);
+        $this->actual = $this->objDate->getYear(DATE('Y'), $year+1);
+        $this->assertSame($this->expected, $this->actual, "デフォルト値");
+    }
+
+    public function testGetYear_引数に指定したキーがデフォルト値となる配列を返す() {
+        $this->expected = 'default';
+        $return = $this->objDate->getYear(DATE('Y'), TRUE, 'default');
+        $this->actual = array_search('----', $return);
+        $this->verify("デフォルトキー");
+    }
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroYearTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroYearTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroYearTest.php	(revision 22187)
@@ -0,0 +1,82 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getZeroYearTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+  
+    public function testGetZeroYear_要素の数が4の配列を返す() {
+        $this->expected = 4;
+        $this->actual = count($this->objDate->getZeroYear());
+        $this->verify("配列の長さ");
+    }
+    
+    public function testGetZeroYear_最小値が2桁表記の今年の配列を返す() {
+        $this->expected = DATE('y');
+        $this->actual = min($this->objDate->getZeroYear());
+        $this->verify("最小値；今年");
+    }
+    
+    public function testGetZeroYear_最低値が引数の年の2桁表記の配列を返す() {
+        $this->expected = '07';
+        $this->actual = min($this->objDate->getZeroYear('2007'));
+
+        $this->verify("引数が最低値");
+    }
+    
+    public function testGetZeroYear_最低値がメンバー変数の年の2桁表記の配列を返す() {
+        $this->expected = '04';
+        $this->objDate->setStartYear('2004');
+        $this->actual = min($this->objDate->getZeroYear());
+
+        $this->verify("メンバー変数が最低値");
+    }
+    
+    public function testGetZeroYear_最大値が3年後の2桁表記の配列を返す() {
+        $this->expected = DATE('y')+3;
+        $this->actual = max($this->objDate->getZeroYear());
+
+        $this->verify("最大値；3年後");
+    }
+    
+    public function testGetZeroYear_最大値がメンバ変数の2桁表記の配列を返す() {
+        $this->expected = '20';
+        $this->objDate->setEndYear('2020');
+        $this->actual = max($this->objDate->getZeroYear());
+
+        $this->verify("メンバー変数が最大値");
+    }
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_AccessorTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_AccessorTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_AccessorTest.php	(revision 22187)
@@ -0,0 +1,70 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_AccessorTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex('2010','2014');
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetStartYear_startYearの値を取得する() {
+        $this->expected = '2010';
+        $this->actual = $this->objDate->getStartYear();
+
+        $this->verify("StartYear");
+    }
+
+    public function testGetEndYear_endYearの値を取得する() {
+        $this->expected = '2014';
+        $this->actual = $this->objDate->getEndYear();
+
+        $this->verify("EndYear");
+    }
+
+    public function testsetMonth_monthの値を設定する() {
+        $this->expected = '9';
+        $this->objDate->setMonth('9');
+        $this->actual = $this->objDate->month;
+
+        $this->verify("Month");
+    }
+    
+    public function testsetDay_dayの値を設定する() {
+        $this->expected = '28';
+        $this->objDate->setDay('28');
+        $this->actual = $this->objDate->day;
+
+        $this->verify("Day");
+    }
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesTest.php	(revision 22187)
@@ -0,0 +1,62 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getMinutesTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetMinutes_要素の数が60の配列を返す() {
+        $this->expected = 60;
+        $this->actual = count($this->objDate->getMinutes());
+
+        $this->verify("配列の長さ");
+    }
+
+    public function testGetMinutes_要素の最低値が0の配列を返す() {
+        $this->expected = 0;
+        $this->actual = min($this->objDate->getMinutes());
+
+        $this->verify("配列の最低値");
+    }
+
+    public function testGetMinutes_要素の最大値が59の配列を返す() {
+        $this->expected = 59;
+        $this->actual = max($this->objDate->getMinutes());
+
+        $this->verify("配列の最大値");
+    }
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMonthTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMonthTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMonthTest.php	(revision 22187)
@@ -0,0 +1,75 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getMonthTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetMonth_要素の数が12の配列を返す() {
+        $this->expected = 12;
+        $this->actual = count($this->objDate->getMonth());
+
+        $this->verify("配列の長さ");
+    }
+
+    public function testGetMonth_要素の最低値が1の配列を返す() {
+        $this->expected = 1;
+        $this->actual = min($this->objDate->getMonth());
+
+        $this->verify("配列の最低値");
+    }
+
+    public function testGetMonth_要素の最大値が12の配列を返す() {
+        $this->expected = 12;
+        $this->actual = max($this->objDate->getMonth());
+
+        $this->verify("配列の最大値");
+    }
+
+    public function testGetMonth_TRUEを与えた場合要素の数が13の配列を返す() {
+        $this->expected = 13;
+        $this->actual = count($this->objDate->getMonth(true));
+
+        $this->verify("デフォルトを設定した配列の長さ");
+    }
+
+    public function testGetMonth_TRUEを与えた場合ーー含まれるの配列を返す() {
+        $result = in_array('--', $this->objDate->getMonth(true));
+
+        $this->assertTrue($result, "デフォルトの値");
+    }
+ 
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroMonthTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroMonthTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getZeroMonthTest.php	(revision 22187)
@@ -0,0 +1,58 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getZeroMonthTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetZeroMonth_要素の数が12の配列を返す() {
+        $this->expected = 12;
+        $this->actual = count($this->objDate->getZeroMonth());
+
+        $this->verify("配列の長さ");
+    }
+
+    public function testGetZeroMonth_0をつけた月の配列を返す() {
+        $this->expected = array('01'=>'01','02'=>'02','03'=>'03'
+                                ,'04'=>'04','05'=>'05','06'=>'06'
+                                ,'07'=>'07','08'=>'08','09'=>'09'
+                                ,'10'=>'10','11'=>'11','12'=>'12'
+                                );
+        $this->actual = $this->objDate->getZeroMonth();
+
+        $this->verify("配列の最低値");
+    }
+
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesIntervalTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesIntervalTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getMinutesIntervalTest.php	(revision 22187)
@@ -0,0 +1,47 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getMinutesIntervalTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetMinutesInterval_要素が00と30の配列を返す() {
+        $this->expected = array('00'=>'00', '30'=>'30');
+        $this->actual = $this->objDate->getMinutesInterval();
+
+        $this->verify("0分と30分");
+    }
+  
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getDayTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getDayTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getDayTest.php	(revision 22187)
@@ -0,0 +1,75 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getDayTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetDay_要素の数が31の配列を返す() {
+        $this->expected = 31;
+        $this->actual = count($this->objDate->getDay());
+
+        $this->verify("配列の長さ");
+    }
+
+    public function testGetDay_要素の最低値が1の配列を返す() {
+        $this->expected = 1;
+        $this->actual = min($this->objDate->getDay());
+
+        $this->verify("配列の最低値");
+    }
+
+    public function testGetDay_要素の最大値が31の配列を返す() {
+        $this->expected = 31;
+        $this->actual = max($this->objDate->getDay());
+
+        $this->verify("配列の最大値");
+    }
+
+    public function testGetDay_TRUEを与えた場合要素の数が32の配列を返す() {
+        $this->expected = 32;
+        $this->actual = count($this->objDate->getDay(true));
+
+        $this->verify("デフォルトを設定した配列の長さ");
+    }
+
+    public function testGetDay_TRUEを与えた場合ーー含まれるの配列を返す() {
+        $result = in_array('--', $this->objDate->getDay(true));
+
+        $this->assertTrue($result, "デフォルトの値");
+    }
+ 
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getHourTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getHourTest.php	(revision 22187)
+++ /branches/version-2_12-multilang/tests/class/SC_Date/SC_Date_getHourTest.php	(revision 22187)
@@ -0,0 +1,62 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Date_getHourTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objDate = new SC_Date_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetHour_24の配列を返す() {
+        $this->expected = 24;
+        $this->actual = count($this->objDate->getHour());
+
+        $this->verify("配列の長さ");
+    }
+
+    public function testGetHour_要素の最低値が0の配列を返す() {
+        $this->expected = 0;
+        $this->actual = min($this->objDate->getHour());
+
+        $this->verify("配列の最低値");
+    }
+
+    public function testGetHour_要素の最大値が23の配列を返す() {
+        $this->expected = 23;
+        $this->actual = max($this->objDate->getHour());
+
+        $this->verify("配列の最大値");
+    }
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php	(revision 22192)
@@ -0,0 +1,63 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_findProductsOrderTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testFindProductIdsOrder_商品ID降順() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        // 商品ID降順で商品IDを取得する
+        $this->objQuery->setOrder('product_id DESC');
+        $this->expected = array('2001','1002', '1001');
+
+        $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery);
+
+        $this->verify('商品ID降順');
+    }
+
+    public function testFindProductIdsOrder_商品名昇順() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        // 商品名昇順で商品IDを取得する
+        $this->objQuery->setOrder('product_id ASC');
+        $this->expected = array('1001', '1002','2001');
+
+        $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery);
+
+        $this->verify('商品ID昇順');
+    }
+    
+    public function testFindProductIdsOrder_arrOrderDataの設定による並び順() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        // setProductsOrderを行う
+        $this->objProducts->setProductsOrder('product_id');
+        $this->expected = array('1001', '1002','2001');
+
+        $this->actual = $this->objProducts->findProductIdsOrder($this->objQuery);
+
+        $this->verify('arrOrderData設定順');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getBuyLimitTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getBuyLimitTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getBuyLimitTest.php	(revision 22192)
@@ -0,0 +1,78 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getBuyLimitTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetBuyLimit_商品数無限の場合販売制限なし() {
+        
+        $product = array('stock_unlimited' => '1'
+                        ,'sale_limit' => null
+                        ,'stock' => null);
+        $this->expected = null;
+        $this->actual = $this->objProducts->getBuyLimit($product);
+
+        $this->verify('販売制限なし');
+    }
+    
+    public function testGetBuyLimit_商品販売数制限数を返す() {
+        
+        $product = array('stock_unlimited' => '1'
+                        ,'sale_limit' => 3
+                        ,'stock' => null);
+        $this->expected = 3;
+        $this->actual = $this->objProducts->getBuyLimit($product);
+
+        $this->verify('販売数制限');
+    }
+    
+    public function testGetBuyLimit_商品在庫数を制限として返す() {
+        
+        $product = array('stock_unlimited' => null
+                        ,'sale_limit' => null
+                        ,'stock' => 5);
+        $this->expected = 5;
+        $this->actual = $this->objProducts->getBuyLimit($product);
+
+        $this->verify('在庫数制限');
+    }
+
+    public function testGetBuyLimit_販売制限数大なり在庫数なら在庫数を返す() {
+        
+        $product = array('stock_unlimited' => null
+                        ,'sale_limit' => 5
+                        ,'stock' => 2);
+        $this->expected = 2;
+        $this->actual = $this->objProducts->getBuyLimit($product);
+
+        $this->verify('販売数＞在庫数制限');
+    }
+    
+    public function testGetBuyLimit_販売制限数少なり在庫数なら販売制限数() {
+        
+        $product = array('stock_unlimited' => null
+                        ,'sale_limit' => 5
+                        ,'stock' => 99);
+        $this->expected = 5;
+        $this->actual = $this->objProducts->getBuyLimit($product);
+
+        $this->verify('販売数＜在庫数制限');
+    }
+
+
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_listsTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_listsTest.php	(revision 22191)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_listsTest.php	(revision 22191)
@@ -0,0 +1,85 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_listsTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testlists_商品一覧取得() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        //更新日を取得
+        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
+
+        $this->expected = array(
+            0 => array(
+                'product_id' => '1001'
+                ,'product_code_min' => 'code1001'
+                ,'product_code_max' => 'code1001'
+                ,'name' => '製品名1001'
+                ,'comment1' => 'コメント10011'
+                ,'comment2' => 'コメント10012'
+                ,'comment3' => 'コメント10013'
+                ,'main_list_comment' => 'リストコメント1001'
+                ,'main_image' => '1001.jpg'
+                ,'main_list_image' => '1001-main.jpg'
+                ,'price01_min' => '1500'
+                ,'price01_max' => '1500'
+                ,'price02_min' => '1500'
+                ,'price02_max' => '1500'
+                ,'stock_min' => '99'
+                ,'stock_max' => '99'
+                ,'stock_unlimited_min' => '0'
+                ,'stock_unlimited_max' => '0'
+                ,'deliv_date_id' => '1'
+                ,'status' => '1'
+                ,'del_flg' => '0'
+                ,'update_date' => $arrRet[0]
+            )
+            ,1 => array(
+                'product_id' => '1002'
+                ,'product_code_min' => 'code1002'
+                ,'product_code_max' => 'code1002'
+                ,'name' => '製品名1002'
+                ,'comment1' => 'コメント10021'
+                ,'comment2' => 'コメント10022'
+                ,'comment3' => 'コメント10023'
+                ,'main_list_comment' => 'リストコメント1002'
+                ,'main_image' => '1002.jpg'
+                ,'main_list_image' => '1002-main.jpg'
+                ,'price01_min' => null
+                ,'price01_max' => null
+                ,'price02_min' => '2500'
+                ,'price02_max' => '2500'
+                ,'stock_min' => null
+                ,'stock_max' => null
+                ,'stock_unlimited_min' => '1'
+                ,'stock_unlimited_max' => '1'
+                ,'deliv_date_id' => '2'
+                ,'status' => '2'
+                ,'del_flg' => '0'
+                ,'update_date' => $arrRet[0]
+
+            )
+        );
+
+        $this->actual = $this->objProducts->lists($this->objQuery);
+
+        $this->verify('商品一覧');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php	(revision 22192)
@@ -0,0 +1,120 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getDetailAndProductsClassTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetDetailAndProductsClass_商品規格IDの商品情報と規格情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        //更新日を取得
+        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
+
+        $this->expected = array(
+                'product_id' => '1001'
+                ,'product_code_min' => 'code1001'
+                ,'product_code_max' => 'code1001'
+                ,'name' => '製品名1001'
+                ,'comment1' => 'コメント10011'
+                ,'comment2' => 'コメント10012'
+                ,'comment3' => 'コメント10013'
+                ,'main_list_comment' => 'リストコメント1001'
+                ,'main_image' => '1001.jpg'
+                ,'main_list_image' => '1001-main.jpg'
+                ,'price01_min' => '1500'
+                ,'price01_max' => '1500'
+                ,'price02_min' => '1500'
+                ,'price02_max' => '1500'
+                ,'stock_min' => '99'
+                ,'stock_max' => '99'
+                ,'stock_unlimited_min' => '0'
+                ,'stock_unlimited_max' => '0'
+                ,'deliv_date_id' => '1'
+                ,'status' => '1'
+                ,'del_flg' => '0'
+                ,'update_date' => $arrRet[0]
+                ,'price01_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price01_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'maker_id' => null
+                ,'comment4' => null
+                ,'comment5' => null
+                ,'comment6' => null
+                ,'note' => null
+                ,'main_comment' => 'メインコメント1001'
+                ,'main_large_image' => null
+                ,'sub_title1' => null
+                ,'sub_comment1' => null
+                ,'sub_image1' => null
+                ,'sub_large_image1' => null
+                ,'sub_title2' => null
+                ,'sub_comment2' => null
+                ,'sub_image2' => null
+                ,'sub_large_image2' => null
+                ,'sub_title3' => null
+                ,'sub_comment3' => null
+                ,'sub_image3' => null
+                ,'sub_large_image3' => null
+                ,'sub_title4' => null
+                ,'sub_comment4' => null
+                ,'sub_image4' => null
+                ,'sub_large_image4' => null
+                ,'sub_title5' => null
+                ,'sub_comment5' => null
+                ,'sub_image5' => null
+                ,'sub_large_image5' => null
+                ,'sub_title6' => null
+                ,'sub_comment6' => null
+                ,'sub_image6' => null
+                ,'sub_large_image6' => null
+                ,'creator_id' => '1'
+                ,'create_date' => $arrRet[0]
+                ,'point_rate' => '0'
+                ,'deliv_fee' => null
+                ,'class_count' => '1'
+                ,'maker_name' => null
+                ,'stock' => '99'
+                ,'stock_unlimited' => '0'
+                ,'sale_limit' => null
+                ,'price01' => '1500'
+                ,'price02' => '1500'
+                ,'product_code' => 'code1001'
+                ,'product_class_id' => '1001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => 'cat1001'
+                ,'rank1' => null
+                ,'class_name1' => '味'
+                ,'class_id1' => '1'
+                ,'classcategory_id1' => '1001'
+                ,'classcategory_id2' => '1002'
+                ,'classcategory_name2' => 'cat1002'
+                ,'rank2' => null
+                ,'class_name2' => '味'
+                ,'class_id2' => '1'
+        );
+
+        $this->actual = $this->objProducts->getDetailAndProductsClass('1001');
+
+        $this->verify('商品詳細＋規格');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductStatusTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductStatusTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductStatusTest.php	(revision 22192)
@@ -0,0 +1,36 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_setProductStatusTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testSetProductStatus_登録した商品ステータスを返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        $this->setUpProductStatus();
+        
+        $this->objProducts->setProductStatus('1001', array('2','3','4'));
+
+        $this->expected = array('1001'=>array('2','3','4'));
+        $productIds = array('1001');
+        $this->actual = $this->objProducts->getProductStatus($productIds);
+
+        $this->verify('商品ステータスの更新');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getDetailTest.php	(revision 22192)
@@ -0,0 +1,100 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getDetailTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetDetail_商品IDの詳細情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        //更新日を取得
+        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
+
+        $this->expected = array(
+                'product_id' => '1001'
+                ,'product_code_min' => 'code1001'
+                ,'product_code_max' => 'code1001'
+                ,'name' => '製品名1001'
+                ,'comment1' => 'コメント10011'
+                ,'comment2' => 'コメント10012'
+                ,'comment3' => 'コメント10013'
+                ,'main_list_comment' => 'リストコメント1001'
+                ,'main_image' => '1001.jpg'
+                ,'main_list_image' => '1001-main.jpg'
+                ,'price01_min' => '1500'
+                ,'price01_max' => '1500'
+                ,'price02_min' => '1500'
+                ,'price02_max' => '1500'
+                ,'stock_min' => '99'
+                ,'stock_max' => '99'
+                ,'stock_unlimited_min' => '0'
+                ,'stock_unlimited_max' => '0'
+                ,'deliv_date_id' => '1'
+                ,'status' => '1'
+                ,'del_flg' => '0'
+                ,'update_date' => $arrRet[0]
+                ,'price01_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price01_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'maker_id' => null
+                ,'comment4' => null
+                ,'comment5' => null
+                ,'comment6' => null
+                ,'note' => null
+                ,'main_comment' => 'メインコメント1001'
+                ,'main_large_image' => null
+                ,'sub_title1' => null
+                ,'sub_comment1' => null
+                ,'sub_image1' => null
+                ,'sub_large_image1' => null
+                ,'sub_title2' => null
+                ,'sub_comment2' => null
+                ,'sub_image2' => null
+                ,'sub_large_image2' => null
+                ,'sub_title3' => null
+                ,'sub_comment3' => null
+                ,'sub_image3' => null
+                ,'sub_large_image3' => null
+                ,'sub_title4' => null
+                ,'sub_comment4' => null
+                ,'sub_image4' => null
+                ,'sub_large_image4' => null
+                ,'sub_title5' => null
+                ,'sub_comment5' => null
+                ,'sub_image5' => null
+                ,'sub_large_image5' => null
+                ,'sub_title6' => null
+                ,'sub_comment6' => null
+                ,'sub_image6' => null
+                ,'sub_large_image6' => null
+                ,'creator_id' => '1'
+                ,'create_date' => $arrRet[0]
+                ,'point_rate' => '0'
+                ,'deliv_fee' => null
+                ,'class_count' => '1'
+                ,'maker_name' => null
+        );
+
+        $this->actual = $this->objProducts->getDetail('1001');
+
+        $this->verify('商品詳細');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductStatusTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductStatusTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductStatusTest.php	(revision 22192)
@@ -0,0 +1,50 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getProductStatusTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetProductStatus_商品IDなしは空の配列を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        $this->setUpProductStatus();
+
+        $this->expected = array();
+        $productIds = null;
+
+        $this->actual = $this->objProducts->getProductStatus($productIds);
+
+        $this->verify('空の配列');
+    }
+    
+    public function testGetProductStatus_指定した商品IDの商品ステータスを返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        $this->setUpProductStatus();
+
+        $this->expected = array('1001' => array('1'));
+        $productIds = array('1001');
+
+        $this->actual = $this->objProducts->getProductStatus($productIds);
+
+        $this->verify('商品ステータス');
+    }
+    
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php	(revision 22192)
@@ -0,0 +1,141 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getProductsClassByProductIdsTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetProductsClassByProductIds_商品IDなしは空配列を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = array();
+        
+        $productIds = array();
+
+        $this->actual = $this->objProducts->getProductsClassByProductIds($productIds);
+
+        $this->verify('商品ID指定なし');
+    }
+    
+    public function testGetProductsClassByProductIds_指定の商品IDの情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = array(
+            0=> array(
+                'product_id' => '1001'
+                ,'del_flg' => '0'
+                ,'point_rate' => '0'
+                ,'stock' => '99'
+                ,'stock_unlimited' => '0'
+                ,'sale_limit' => null
+                ,'price01' => '1500'
+                ,'price02' => '1500'
+                ,'product_code' => 'code1001'
+                ,'product_class_id' => '1001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => 'cat1001'
+                ,'rank1' => null
+                ,'class_name1' => '味'
+                ,'class_id1' => '1'
+                ,'classcategory_id1' => '1001'
+                ,'classcategory_id2' => '1002'
+                ,'classcategory_name2' => 'cat1002'
+                ,'rank2' => null
+                ,'class_name2' => '味'
+                ,'class_id2' => '1'
+            )
+        );
+        
+        $productIds = array('1001','2001');
+
+        $this->actual = $this->objProducts->getProductsClassByProductIds($productIds);
+
+        $this->verify('商品ID指定');
+    }
+    
+    public function testGetProductsClassByProductIds_削除商品含む商品情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = array(
+            0=> array(
+                'product_id' => '1001'
+                ,'del_flg' => '0'
+                ,'point_rate' => '0'
+                ,'stock' => '99'
+                ,'stock_unlimited' => '0'
+                ,'sale_limit' => null
+                ,'price01' => '1500'
+                ,'price02' => '1500'
+                ,'product_code' => 'code1001'
+                ,'product_class_id' => '1001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => 'cat1001'
+                ,'rank1' => null
+                ,'class_name1' => '味'
+                ,'class_id1' => '1'
+                ,'classcategory_id1' => '1001'
+                ,'classcategory_id2' => '1002'
+                ,'classcategory_name2' => 'cat1002'
+                ,'rank2' => null
+                ,'class_name2' => '味'
+                ,'class_id2' => '1'
+            ),
+            1=> array(
+                'product_id' => '2001'
+                ,'del_flg' => '1'
+                ,'point_rate' => '0'
+                ,'stock' => null
+                ,'stock_unlimited' => '1'
+                ,'sale_limit' => null
+                ,'price01' => null
+                ,'price02' => '2000'
+                ,'product_code' => 'code2001'
+                ,'product_class_id' => '2001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => null
+                ,'rank1' => null
+                ,'class_name1' => null
+                ,'class_id1' => null
+                ,'classcategory_id1' => '0'
+                ,'classcategory_id2' => '0'
+                ,'classcategory_name2' => null
+                ,'rank2' => null
+                ,'class_name2' => null
+                ,'class_id2' => null
+            )
+        );
+        
+        $productIds = array('1001','2001');
+
+        $this->actual = $this->objProducts->getProductsClassByProductIds($productIds,true);
+
+        $this->verify('商品ID指定');
+    }
+    
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php	(revision 22192)
@@ -0,0 +1,77 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getListsByProductIdsTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetListByProductIds_商品ID指定がない場合は空配列() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = array();
+
+        $this->actual = $this->objProducts->getListByProductIds($this->objQuery);
+
+        $this->verify('商品ID指定なし');
+    }
+    
+    public function testGetListByProductIds_指定の商品IDで情報を取得する() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $arrProductId = array('1001');
+        //更新日を取得
+        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
+
+        $this->expected = array(
+            '1001' => array(
+                'product_id' => '1001'
+                ,'product_code_min' => 'code1001'
+                ,'product_code_max' => 'code1001'
+                ,'name' => '製品名1001'
+                ,'comment1' => 'コメント10011'
+                ,'comment2' => 'コメント10012'
+                ,'comment3' => 'コメント10013'
+                ,'main_list_comment' => 'リストコメント1001'
+                ,'main_image' => '1001.jpg'
+                ,'main_list_image' => '1001-main.jpg'
+                ,'price01_min' => '1500'
+                ,'price01_max' => '1500'
+                ,'price02_min' => '1500'
+                ,'price02_max' => '1500'
+                ,'stock_min' => '99'
+                ,'stock_max' => '99'
+                ,'stock_unlimited_min' => '0'
+                ,'stock_unlimited_max' => '0'
+                ,'deliv_date_id' => '1'
+                ,'status' => '1'
+                ,'del_flg' => '0'
+                ,'update_date' => $arrRet[0]
+                ,'price01_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price01_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_min_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+                ,'price02_max_inctax' => SC_Helper_DB::sfCalcIncTax('1500')
+            )
+        );
+
+        $this->actual = $this->objProducts->getListByProductIds($this->objQuery, $arrProductId);
+
+        $this->verify('商品ID指定');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassTest.php	(revision 22192)
@@ -0,0 +1,57 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getProductsClassTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetProductsClass_商品規格IDから規格情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $this->expected = array(
+                'product_id' => '1001'
+                ,'del_flg' => '0'
+                ,'point_rate' => '0'
+                ,'stock' => '99'
+                ,'stock_unlimited' => '0'
+                ,'sale_limit' => null
+                ,'price01' => '1500'
+                ,'price02' => '1500'
+                ,'product_code' => 'code1001'
+                ,'product_class_id' => '1001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => 'cat1001'
+                ,'rank1' => null
+                ,'class_name1' => '味'
+                ,'class_id1' => '1'
+                ,'classcategory_id1' => '1001'
+                ,'classcategory_id2' => '1002'
+                ,'classcategory_name2' => 'cat1002'
+                ,'rank2' => null
+                ,'class_name2' => '味'
+                ,'class_id2' => '1'
+        );
+
+        $this->actual = $this->objProducts->getProductsClass('1001');
+
+        $this->verify('商品規格');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_TestBase.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_TestBase.php	(revision 22190)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_TestBase.php	(revision 22190)
@@ -0,0 +1,181 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Product_TestBase extends Common_TestCase {
+    protected function setUp() {
+        parent::setUp();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /**
+     * DBに商品クラス情報を設定します.
+     */
+    protected function setUpProductClass() {
+        $product_class = array(
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_class_id' => '1001',
+                'product_id' => '1001',
+                'product_type_id' => '1',
+                'product_code' => 'code1001',
+                'classcategory_id1' => '1001',
+                'classcategory_id2' => '1002',
+                'price01' => '1500',
+                'price02' => '1500',
+                'stock' => '99',
+                'creator_id' => '1',
+                'del_flg' => '0'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_class_id' => '1002',
+                'product_id' => '1002',
+                'product_type_id' => '2',
+                'product_code' => 'code1002',
+                'price02' => '2500',
+                'creator_id' => '1',
+                'stock_unlimited' => '1',
+                'del_flg' => '0'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_class_id' => '2001',
+                'product_id' => '2001',
+                'product_type_id' => '1',
+                'product_code' => 'code2001',
+                'price02' => '2000',
+                'creator_id' => '1',
+                'stock_unlimited' => '1',
+                'del_flg' => '1'
+                  )
+                               );
+
+        $this->objQuery->delete('dtb_products_class');
+        foreach ($product_class as $key => $item) {
+            $this->objQuery->insert('dtb_products_class', $item);
+        }
+        $this->setUpClassCategory();
+        $this->setUpProducts();
+    }
+
+    /**
+     * DBに製品カテゴリ情報を登録します.
+     */
+    protected function setUpClassCategory() {
+        $class_category = array(
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'classcategory_id' => '1001',
+                'class_id' => '1',
+                'creator_id' => '1',
+                'name' => 'cat1001'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'classcategory_id' => '1002',
+                'class_id' => '1',
+                'creator_id' => '1',
+                'name' => 'cat1002'
+                  )
+                                );
+
+        $this->objQuery->delete('dtb_classcategory');
+        foreach ($class_category as $key => $item) {
+            $this->objQuery->insert('dtb_classcategory', $item);
+        }
+    }
+
+    /** 
+     * DBに製品情報を登録します.
+     */
+    protected function setUpProducts() {
+        $products = array(
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_id' => '1001',
+                'name' => '製品名1001',
+                'comment1' => 'コメント10011',
+                'comment2' => 'コメント10012',
+                'comment3' => 'コメント10013',
+                'main_list_comment' => 'リストコメント1001',
+                'main_comment' => 'メインコメント1001',
+                'main_image' => '1001.jpg',
+                'main_list_image' => '1001-main.jpg',
+                'deliv_date_id' => '1',
+                'del_flg' => '0',
+                'creator_id' => '1',
+                'status' => '1'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_id' => '1002',
+                'name' => '製品名1002',
+                'comment1' => 'コメント10021',
+                'comment2' => 'コメント10022',
+                'comment3' => 'コメント10023',
+                'main_list_comment' => 'リストコメント1002',
+                'main_image' => '1002.jpg',
+                'main_list_image' => '1002-main.jpg',
+                'deliv_date_id' => '2',
+                'del_flg' => '0',
+                'creator_id' => '1',
+                'status' => '2'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_id' => '2001',
+                'name' => '製品名2001',
+                'comment1' => 'コメント20011',
+                'comment2' => 'コメント20012',
+                'comment3' => 'コメント20013',
+                'main_list_comment' => 'リストコメント2001',
+                'main_comment' => 'メインコメント2001',
+                'main_image' => '2001.jpg',
+                'main_list_image' => '2001-main.jpg',
+                'deliv_date_id' => '1',
+                'del_flg' => '1',
+                'creator_id' => '1',
+                'status' => '1'
+                  )
+                          );
+
+        $this->objQuery->delete('dtb_products');
+        foreach ($products as $key => $item) {
+            $this->objQuery->insert('dtb_products', $item);
+        }
+    }
+    
+    /**
+     * DBに商品ステータス情報を登録します.
+     */
+    protected function setUpProductStatus() {
+        $class_category = array(
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_status_id' => '1',
+                'product_id' => '1001',
+                'creator_id' => '1',
+                'del_flg' => '0'
+                  ),
+            array(
+                'update_date' => 'CURRENT_TIMESTAMP',
+                'product_status_id' => '1',
+                'product_id' => '1002',
+                'creator_id' => '1',
+                'del_flg' => '0'
+                  )
+                                );
+
+        $this->objQuery->delete('dtb_product_status');
+        foreach ($class_category as $key => $item) {
+            $this->objQuery->insert('dtb_product_status', $item);
+        }
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductCountTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductCountTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_findProductCountTest.php	(revision 22192)
@@ -0,0 +1,48 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_findProductCountTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testFindProductCount_すべての商品数を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = 3;
+
+        $this->actual = $this->objProducts->findProductCount($this->objQuery);
+
+        $this->verify('商品数');
+    }
+    
+    public function testFindProductCount_検索条件に一致する商品数を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $this->objQuery->setWhere('product_id = ?');
+        $arrVal = array(1001);
+
+        $this->expected = 1;
+
+        $this->actual = $this->objProducts->findProductCount($this->objQuery, $arrVal);
+
+        $this->verify('検索商品数');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php	(revision 22192)
@@ -0,0 +1,60 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_getProductsClassByQueryTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetProductsClassByQuery_クエリに該当する商品情報を返す() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+
+        $this->expected = array(
+            0=> array(
+                'product_id' => '1001'
+                ,'del_flg' => '0'
+                ,'point_rate' => '0'
+                ,'stock' => '99'
+                ,'stock_unlimited' => '0'
+                ,'sale_limit' => null
+                ,'price01' => '1500'
+                ,'price02' => '1500'
+                ,'product_code' => 'code1001'
+                ,'product_class_id' => '1001'
+                ,'product_type_id' => '1'
+                ,'down_filename' => null
+                ,'down_realfilename' => null
+                ,'classcategory_name1' => 'cat1001'
+                ,'rank1' => null
+                ,'class_name1' => '味'
+                ,'class_id1' => '1'
+                ,'classcategory_id1' => '1001'
+                ,'classcategory_id2' => '1002'
+                ,'classcategory_name2' => 'cat1002'
+                ,'rank2' => null
+                ,'class_name2' => '味'
+                ,'class_id2' => '1'
+            )
+        );
+        $this->objQuery->setWhere('product_id = ?');
+
+        $this->actual = $this->objProducts->getProductsClassByQuery($this->objQuery, array('1001'));
+
+        $this->verify('商品情報クエリ');
+    }
+    
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_reduceStockTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_reduceStockTest.php	(revision 22192)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_reduceStockTest.php	(revision 22192)
@@ -0,0 +1,73 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_reduceStockTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testReduceStock_減少数０はFalse() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $productClassId = '1001';
+        $quantity = '0';
+        $this->expected = false;
+        $this->actual = $this->objProducts->reduceStock($productClassId, $quantity);
+
+        $this->verify('減少数０');
+    }
+    
+    public function testReduceStock_減少数1はTrue() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $productClassId = '1001';
+        $quantity = '1';
+        $this->expected = true;
+        $this->actual = $this->objProducts->reduceStock($productClassId, $quantity);
+
+        $this->verify('減少数1');
+    }
+    
+    public function testReduceStock_在庫数をマイナスにする数はFalse() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $productClassId = '1001';
+        $quantity = '100';
+        $this->expected = false;
+        $this->actual = $this->objProducts->reduceStock($productClassId, $quantity);
+
+        $this->verify('在庫数マイナス');
+    }
+    
+        
+    public function testReduceStock_在庫数無限の場合はTrue() {
+        $this->setUpProductClass();
+        $this->setUpProducts();
+        $this->setUpClassCategory();
+        
+        $productClassId = '1002';
+        $quantity = '100';
+        $this->expected = true;
+        $this->actual = $this->objProducts->reduceStock($productClassId, $quantity);
+
+        $this->verify('在庫数無限');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductsOrderTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductsOrderTest.php	(revision 22188)
+++ /branches/version-2_12-multilang/tests/class/SC_Product/SC_Product_setProductsOrderTest.php	(revision 22188)
@@ -0,0 +1,37 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
+/**
+ *
+ */
+class SC_Product_setProductsOrderTest extends SC_Product_TestBase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objProducts = new SC_Product_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+    public function testSetProductsOrder_デフォルト引数() {
+        $this->objProducts->setProductsOrder('name');
+
+        $this->actual = $this->objProducts->arrOrderData;
+        $this->expected = array('col' => 'name', 'table' => 'dtb_products', 'order' => 'ASC');
+
+        $this->verify('デフォルト引数');
+    }
+
+    public function testSetProductsOrder_引数指定() {
+        $this->objProducts->setProductsOrder('name', 'dtb_products_class', 'DESC');
+
+        $this->actual = $this->objProducts->arrOrderData;
+        $this->expected = array('col' => 'name', 'table' => 'dtb_products_class', 'order' => 'DESC');
+
+        $this->verify('デフォルト引数');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getUniqIdTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getUniqIdTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getUniqIdTest.php	(revision 22195)
@@ -0,0 +1,59 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_getUniqIdTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Mock();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testGetUniqId_設定済みのユニークなID取得する() {
+        $_SESSION['site']['uniqid'] = '0987654321';
+        $this->expected = '0987654321';
+        $this->actual = $this->objSiteSession->getUniqId();
+        $this->verify('ユニークID');
+    }
+    
+    public function testGetUniqId_新たにユニークなID取得する() {
+        $_SESSION['site']['uniqid'] = '';
+        $this->expected = '1234567890';
+        $this->actual = $this->objSiteSession->getUniqId();
+        $this->verify('ユニークID');
+    }
+}
+
+class SC_SiteSession_Mock extends SC_SiteSession_Ex {
+    function setUniqId() {
+        $_SESSION['site']['uniqid'] = '1234567890';
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getValueTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getValueTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_getValueTest.php	(revision 22195)
@@ -0,0 +1,46 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_getValueTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testSetNowPage_セッションの値を取得する() {
+        $this->expected = $_SERVER['SCRIPT_NAME'];
+        $this->actual = $this->objSiteSession->getValue('now_page');
+        $this->verify("セッション値");
+    }
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setNowPageTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setNowPageTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setNowPageTest.php	(revision 22195)
@@ -0,0 +1,47 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_setNowPageTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testSetNowPage_now_pageにパスを設定する() {
+        $this->expected = 'test.php';
+        $this->objSiteSession->setNowPage('test.php');
+        $this->actual = $_SESSION['site']['now_page'];
+        $this->verify("ベージセット");
+    }
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_isPrepageTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_isPrepageTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_isPrepageTest.php	(revision 22195)
@@ -0,0 +1,68 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_isPrepageTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testIsPrepage_sessionが空の場合_false() {
+        $this->expected = false;
+        $this->actual = $this->objSiteSession->isPrepage();
+        $this->verify("ページ判定");
+    }
+    
+    public function testIsPrepage_prepageとnowpageが違う場合_false() {
+        $this->expected = false;
+        $_SESSION['site']['pre_page'] = 'test.php';
+        $this->actual = $this->objSiteSession->isPrepage();
+        $this->verify("ページ判定");
+    }
+    
+    public function testIsPrepage_prepageとnowpageが同じの場合_true() {
+        $this->expected = true;
+        $_SESSION['site']['pre_page'] = $_SERVER['SCRIPT_NAME'];
+        $this->actual = $this->objSiteSession->isPrepage();
+        $this->verify("ページ判定");
+    }
+    
+    public function testIsPrepage_pre_regist_successがtrueの場合_true() {
+        $this->expected = true;
+        $_SESSION['site']['pre_page'] = 'test.php';
+        $_SESSION['site']['pre_regist_success'] = true;
+        $this->actual = $this->objSiteSession->isPrepage();
+        $this->verify("ページ判定");
+    }
+}
+
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setRegistFlagTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setRegistFlagTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setRegistFlagTest.php	(revision 22195)
@@ -0,0 +1,44 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_setRegistFlagTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testSetRegistFlag_TRUEがセットされる() {
+        $this->objSiteSession->setRegistFlag();
+        $this->assertTrue($_SESSION['site']['regist_success'],'登録成功フラグ');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setUniqIdTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setUniqIdTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_setUniqIdTest.php	(revision 22195)
@@ -0,0 +1,44 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_setUniqIdTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testSetUniqId_ユニークなID設定する() {
+        $this->objSiteSession->setUniqId();
+        $this->assertNotEmpty($_SESSION['site']['uniqid'], 'ユニークID');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_checkUniqIdTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_checkUniqIdTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_checkUniqIdTest.php	(revision 22195)
@@ -0,0 +1,65 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_checkUniqIdTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testCheckUniqId_POST値がない場合_True() {
+        $_POST = null;
+        $this->expected = true;
+        $this->actual = $this->objSiteSession->checkUniqId();
+        $this->verify('ポスト値空');
+    }
+    
+    public function testCheckUniqId_POSTとセッションのUniqIDが一致する場合_True() {
+        $_POST['uniqid'] = '1234567890';
+        $_SESSION['site']['uniqid'] = '1234567890';
+        
+        $this->expected = true;
+        $this->actual = $this->objSiteSession->checkUniqId();
+        $this->verify('ユニークID一致');
+    }
+    
+    public function testCheckUniqId_POSTとセッションのUniqIDが一致しない場合_False() {
+        $_POST['uniqid'] = '0987654321';
+        $_SESSION['site']['uniqid'] = '1234567890';
+        
+        $this->expected = false;
+        $this->actual = $this->objSiteSession->checkUniqId();
+        $this->verify('ユニークID不一致');
+    }
+
+}
Index: /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_unsetUniqIdTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_unsetUniqIdTest.php	(revision 22195)
+++ /branches/version-2_12-multilang/tests/class/SC_SiteSession/SC_SiteSession_unsetUniqIdTest.php	(revision 22195)
@@ -0,0 +1,45 @@
+<?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.
+ */
+
+$HOME = realpath(dirname(__FILE__)) . "/../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+
+class SC_Session_unsetUniqIdTest extends Common_TestCase {
+
+    protected function setUp() {
+        parent::setUp();
+        $this->objSiteSession = new SC_SiteSession_Ex();
+    }
+
+    protected function tearDown() {
+        parent::tearDown();
+    }
+
+    /////////////////////////////////////////
+
+    public function testUnsetUniqId_uniqIDを解除する() {
+        $_SESSION['site']['uniqid'] = '1234567890';
+        $this->objSiteSession->unsetUniqId();
+        $this->assertEmpty($_SESSION['site']['uniqid'], '空のユニークID');
+    }
+}
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php	(revision 22278)
@@ -0,0 +1,66 @@
+<?php
+
+$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_Utils::sfPrintR()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfPrintRTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  // TODO 環境により出力形式が異なるため、テスト不可(デバッグ用なので、テストしなくてもよさそう)
+  /**
+  public function testSfPrintR__指定したオブジェクトの情報が出力される() {
+    $output = '<div style="font-size: 12px;color: #00FF00;">' . "\n"
+      . '<strong>**デバッグ中**</strong><br />' . "\n"
+      . '<pre>' . "\n"
+      . 'array(1) {' . "\n"
+      . '  ["test"]=>' . "\n"
+      . '  string(4) "TEST"' . "\n"
+      . '}' . "\n"
+      . '</pre>' . "\n"
+      . '<strong>**デバッグ中**</strong></div>' . "\n";
+
+    $this->expectOutputString($output);
+    SC_Utils::sfPrintR(array('test'=>'TEST'));
+  }
+  */
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfFlushTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfFlushTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfFlushTest.php	(revision 22278)
@@ -0,0 +1,67 @@
+<?php
+
+$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_Utils::sfFlush()のテストクラス.
+ * flushされてしまうためexpectOutputString()が使えないので、
+ * 逆にflushされて空になっていることだけ確認する.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfFlushTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfFlush_IEの場合_フラッシュされる() {
+    $this->expectOutputString('');
+    echo 'Hello, World!!';
+    SC_Utils::sfFlush(TRUE);
+  }
+
+  public function testSfFlush_文字列を指定した場合_フラッシュされる() {
+    $this->expectOutputString('');
+    echo 'Hello, World!!';
+    SC_Utils::sfFlush('Hello');
+  }
+
+  public function testSfFlush_参考_この関数を呼ばないとバッファに出力が残る() {
+    $this->expectOutputString('Hello, World!!');
+    echo 'Hello, World!!';
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCutStringTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCutStringTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCutStringTest.php	(revision 22278)
@@ -0,0 +1,159 @@
+<?php
+
+$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_Utils::sfCutString()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfCutStringTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfCutString_マルチバイト指定で指定長より2文字以上長い場合_指定長でカットされる() {
+    $input = 'あいうえおABC、こんにちは。';
+    $this->expected = 'あいうえおABC、こんにち...';
+    $this->actual = SC_Utils::sfCutString($input, 13, false);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_マルチバイト指定で指定長より1文字長い場合_カットされない() {
+    $input = 'あいうえおABC、こんにちは';
+    $this->expected = 'あいうえおABC、こんにちは';
+    $this->actual = SC_Utils::sfCutString($input, 13, false);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_マルチバイト指定で指定長以内の場合_カットされない() {
+    $input = 'あいうえおABC、こんにち';
+    $this->expected = 'あいうえおABC、こんにち';
+    $this->actual = SC_Utils::sfCutString($input, 13, false);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_1バイト指定で指定長より3文字以上長い場合_指定長でカットされる() {
+    $input = 'hello, world!!';
+    $this->expected = 'hello, worl...';
+    $this->actual = SC_Utils::sfCutString($input, 11);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_1バイト指定で指定長より2文字長い場合_カットされない() {
+    $input = 'hello, world!';
+    $this->expected = 'hello, world!';
+    $this->actual = SC_Utils::sfCutString($input, 11);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_1バイト指定で指定長より1文字長い場合_カットされない() {
+    $input = 'hello, world';
+    $this->expected = 'hello, world';
+    $this->actual = SC_Utils::sfCutString($input, 11);
+
+    $this->verify();
+  }
+
+  public function testSfCutString_1バイト指定で指定長以内の場合_カットされない() {
+    $input = 'hello, worl';
+    $this->expected = 'hello, worl';
+    $this->actual = SC_Utils::sfCutString($input, 11);
+
+    $this->verify();
+  }
+
+  // [までの場合
+  public function testSfCutString_絵文字を含んでカットされる場合_中途半端な絵文字がカットされる1() {
+    $input = "hello[emoji:135], world.";
+    $this->expected = 'hello...';
+    $this->actual = SC_Utils::sfCutString($input, 6);
+
+    $this->verify();
+  }
+
+  // ]の直前までの場合
+  public function testSfCutString_絵文字を含んでカットされる場合_中途半端な絵文字がカットされる2() {
+    $input = "hello[emoji:135], world.";
+    $this->expected = 'hello...';
+    $this->actual = SC_Utils::sfCutString($input, 15);
+
+    $this->verify();
+  }
+
+  // 最初の絵文字の途中
+  public function testSfCutString_複数の絵文字を含んでいてカットされる場合_中途半端な絵文字がカットされる1() {
+    $input = "hello[emoji:100][emoji:20], world![emoji:10]";
+    $this->expected = 'hello...';
+    $this->actual = SC_Utils::sfCutString($input, 10);
+
+    $this->verify();
+  }
+
+  // 2つめの絵文字の途中
+  public function testSfCutString_複数の絵文字を含んでいてカットされる場合_中途半端な絵文字がカットされる2() {
+    $input = "hello[emoji:100][emoji:20], world![emoji:10]";
+    $this->expected = 'hello[emoji:100]...';
+    $this->actual = SC_Utils::sfCutString($input, 20);
+
+    $this->verify();
+  }
+
+  // 3つめの絵文字の途中
+  public function testSfCutString_複数の絵文字を含んでいてカットされる場合_中途半端な絵文字がカットされる3() {
+    $input = "hello[emoji:100][emoji:20], world![emoji:10]";
+    $this->expected = 'hello[emoji:100][emoji:20], wo...';
+    $this->actual = SC_Utils::sfCutString($input, 30);
+    
+    $this->verify();
+  }
+
+  // TODO 要確認 三点リーダ付けない場合は、lenと比較した方が良いのでは？
+  public function testSfCutString_三点リーダ付加指定がない場合_付加されない() {
+    $input = 'hello, world';
+    $this->expected = 'hello';
+    $this->actual = SC_Utils::sfCutString($input, 5, true, false);
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfUpDirNameTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfUpDirNameTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfUpDirNameTest.php	(revision 22278)
@@ -0,0 +1,58 @@
+<?php
+
+$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_Utils::sfUpDirName()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfUpDirNameTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfUpDirName__1階層上のディレクトリ名が取得できる() {
+    $_SERVER['SCRIPT_NAME'] = 'dir1/dir2/updir/current';
+
+    $this->expected = 'updir';
+    $this->actual = SC_Utils::sfUpDirName();
+
+    $this->verify('ディレクトリ名');
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCSVListTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCSVListTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCSVListTest.php	(revision 22278)
@@ -0,0 +1,67 @@
+<?php
+
+$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_Utils::sfGetCSVList()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetCSVListTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfGetCSVList_配列が空の場合_falseが返る() {
+    
+    $this->expected = FALSE;
+    $this->actual = SC_Utils::sfGetCSVList(array());
+
+    $this->verify();
+  }
+
+  public function testSfGetCSVList_配列に要素が存在する場合_CSV形式に変換した文字列が返る() {
+    
+    $this->expected = '"1つ目の要素","カンマを,含む要素","3つ目の要素"' . "\r\n";
+    $this->actual = SC_Utils::sfGetCSVList(
+      array('1つ目の要素', 'カンマを,含む要素', '3つ目の要素')
+    );
+
+    $this->verify('CSVフォーマットの文字列');
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfEncodeFileTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfEncodeFileTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfEncodeFileTest.php	(revision 22278)
@@ -0,0 +1,78 @@
+<?php
+
+$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_Utils::sfEncodeFile()のテストクラス.
+ * TODO $out_dirで最後のスラッシュまで必ず指定しなければいけないのが少し気になる
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfEncodeFileTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfEncodeFile_ファイルが正常に開けた場合_ファイルがエンコードされ出力先のパスが取得できる() {
+    $outdir = realpath(dirname(__FILE__)) . "/../../../tmp/enc_output/";
+    SC_Helper_FileManager::deleteFile($outdir);
+    mkdir($outdir, 0777, TRUE);
+    $indir = realpath(dirname(__FILE__)) . "/../../../tmp/enc_input/";
+    SC_Helper_FileManager::deleteFile($indir);
+    mkdir($indir, 0777, TRUE);
+
+    $filepath = $indir . 'test.txt';
+    $fp_out = fopen($filepath, 'w');
+    fwrite($fp_out, 'こんにちは');
+    fclose($fp_out);
+
+    $this->expected = array(
+      'filename' => $outdir . 'enc_test.txt',
+      'content' => 'こんにちは'
+    );
+
+    $this->actual['filename'] = SC_Utils::sfEncodeFile($filepath, 'euc-jp', $outdir);
+
+    $fp_in = fopen($outdir . 'enc_test.txt', 'r');
+    $this->actual['content'] = mb_convert_encoding(fread($fp_in, 100), 'utf8', 'euc-jp');
+    fclose($fp_in);
+
+    $this->verify();
+  }
+
+  //TODO ファイルが開けなかった場合はexitするためテスト不可
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfErrorHeaderTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfErrorHeaderTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfErrorHeaderTest.php	(revision 22278)
@@ -0,0 +1,66 @@
+<?php
+
+$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_Utils::sfErrorHeader()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfErrorHeaderTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfErrorHeader_printフラグがONの場合_指定したメッセージが出力される() {
+    global $GLOBAL_ERR; 
+    $this->expectOutputString($GLOBAL_ERR . '<div id="errorHeader">ERROR MESSAGE</div>');
+    SC_Utils::sfErrorHeader('ERROR MESSAGE', TRUE);
+  }
+
+  public function testSfErrorHeader_printフラグがOFFの場合_指定したメッセージがグローバル変数に格納される() {
+    global $GLOBAL_ERR;
+    $this->expectOutputString('');
+    $old_err = $GLOBAL_ERR;
+    SC_Utils::sfErrorHeader('ERROR MESSAGE');
+    $this->expected = $old_err . '<div id="errorHeader">ERROR MESSAGE</div>';
+    $this->actual = $GLOBAL_ERR;
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_recursiveMkDirTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_recursiveMkDirTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_recursiveMkDirTest.php	(revision 22278)
@@ -0,0 +1,74 @@
+<?php
+
+$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_Utils::recursiveMkDir()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_recursiveMkdirTest extends Common_TestCase {
+
+  static $TMP_DIR;
+
+  protected function setUp() {
+    self::$TMP_DIR = realpath(dirname(__FILE__)) . "/../../../tmp";
+    SC_Helper_FileManager::deleteFile(self::$TMP_DIR);
+    mkdir(self::$TMP_DIR, 0777, true);
+// parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testRecursiveMkdir_パーミッションを指定した場合_指定のパーミッションでディレクトリが作られる() {
+    $path = realpath(dirname(__FILE__)) . "/../../../tmp/dir1/dir2/dir3/";
+    $mode = 0755;
+
+    $result = SC_Utils::recursiveMkdir($path, $mode);
+    $this->expected = '0755';
+    $this->actual = substr(sprintf('%o', fileperms($path)), -4);
+
+    $this->verify('作成したディレクトリのパーミッション');
+  }
+
+  public function testRecursiveMkdir_パーミッションを指定しない場合_0777でディレクトリが作られる() {
+    $path = realpath(dirname(__FILE__)) . "/../../../tmp/dir1/dir2/dir3/";
+
+    $result = SC_Utils::recursiveMkdir($path);
+    $this->expected = '0777';
+    $this->actual = substr(sprintf('%o', fileperms($path)), -4);
+
+    $this->verify('作成したディレクトリのパーミッション');
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isInternalDomainTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isInternalDomainTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isInternalDomainTest.php	(revision 22278)
@@ -0,0 +1,73 @@
+<?php
+
+$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_Utils::sfIsInternalDomain()のテストクラス.
+ * HTTP_URL='http://test.local' という前提でテスト.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfIsInternalDomainTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testsfIsInternalDomain_ドメインが一致する場合_trueが返る() {
+    $url = 'http://test.local/html/index.php';
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsInternalDomain($url);
+
+    $this->verify($url);
+  }
+
+  public function testsfIsInternalDomain_アンカーを含むURLの場合_trueが返る() {
+    $url = 'http://test.local/html/index.php#hoge';
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsInternalDomain($url);
+
+    $this->verify($url);
+  }
+
+  public function testsfIsInternalDomain_ドメインが一致しない場合_falseが返る() {
+    $url = 'http://test.local.jp/html/index.php';
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsInternalDomain($url);
+
+    $this->verify($url);
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCopyDirtest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCopyDirtest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCopyDirtest.php	(revision 22278)
@@ -0,0 +1,196 @@
+<?php
+
+$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_Utils::sfCopyDir()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfCopyDirTest extends Common_TestCase {
+
+  static $TMP_DIR;
+
+  protected function setUp() {
+    // parent::setUp();
+    self::$TMP_DIR = realpath(dirname(__FILE__)) . "/../../../tmp";
+    SC_Helper_FileManager::deleteFile(self::$TMP_DIR);
+    mkdir(self::$TMP_DIR, 0777, true);
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfCopyDir_ディレクトリでない場合_falseを返し何もしない() {
+    mkdir(self::$TMP_DIR . "/src", 0777, true);
+    $fp = fopen(self::$TMP_DIR . "/src/test.txt", "w");
+    fwrite($fp, "hello");
+    fclose($fp);
+
+    $src = self::$TMP_DIR . "/src/test.txt"; // ディレクトリではなくファイルを指定
+    $dst = self::$TMP_DIR . "/dst/";
+
+    $this->expected = array(
+      'result' => FALSE,
+      'file_exists' => FALSE
+    );
+    $this->actual['result'] = SC_Utils::sfCopyDir($src, $dst);
+    $this->actual['file_exists'] = file_exists($dst);
+
+    $this->verify();
+  }
+
+  public function testSfCopyDir_コピー先のディレクトリが存在しない場合_新たに作成する() {
+    mkdir(self::$TMP_DIR . "/src", 0777, true);
+    $fp = fopen(self::$TMP_DIR . "/src/test.txt", "w");
+    fwrite($fp, "hello");
+    fclose($fp);
+
+    $src = self::$TMP_DIR . "/src/";
+    $dst = self::$TMP_DIR . "/dst/";
+
+    $this->expected = array(
+      'dir_exists' => TRUE,
+      'files' => array('test.txt') 
+    );
+    SC_Utils::sfCopyDir($src, $dst);
+    $this->actual['dir_exists'] = is_dir($dst);
+    $this->actual['files'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst), 'file_name');
+
+    $this->verify();
+  }
+
+  // TODO CVS以下のEntriesなどはコピーされないが、CVSという親ディレクトリはコピーされてしまう。
+  // そもそも、CVSだけ特別扱いする意味がないような…
+  public function testSfCopyDir_コピー先のディレクトリが存在する場合_そのままコピーする() {
+    mkdir(self::$TMP_DIR . "/src", 0777, true);
+    mkdir(self::$TMP_DIR . "/dst", 0777, true); // コピー先も作成しておく
+    $fp = fopen(self::$TMP_DIR . "/src/test.txt", "w");
+    fwrite($fp, "hello");
+    fclose($fp);
+
+    // CVS関連のディレクトリ
+    mkdir(self::$TMP_DIR . "/src/CVS/Entries", 0777, true);
+    mkdir(self::$TMP_DIR . "/src/CVS/Repository", 0777, true);
+    mkdir(self::$TMP_DIR . "/src/CVS/Root", 0777, true);
+
+    // 入れ子になったディレクトリ
+    mkdir(self::$TMP_DIR . "/src/dir1/dir12/dir123", 0777, true);
+
+    // 上書きされないファイル
+    $fp = fopen(self::$TMP_DIR . "/dst/test.txt", "w");
+    fwrite($fp, "good morning");
+    fclose($fp);
+
+    $src = self::$TMP_DIR . "/src/";
+    $dst = self::$TMP_DIR . "/dst/";
+
+    $this->expected = array(
+      'dir_exists' => TRUE,
+      'files' => array('CVS', 'dir1', 'test.txt'),
+      'files_2' => array('dir12'),
+      'files_3' => array('dir123'),
+      'file_content' => 'good morning'
+    );
+    SC_Utils::sfCopyDir($src, $dst);
+    $this->actual['dir_exists'] = is_dir($dst);
+    $this->actual['files'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst), 'file_name');
+    $this->actual['files_2'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst . "dir1/"), 'file_name');
+    $this->actual['files_3'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst . "dir1/dir12/"), 'file_name');
+    $fp = fopen(self::$TMP_DIR . "/dst/test.txt", "r");
+    $this->actual['file_content'] = fread($fp, 100);
+
+    $this->verify();
+  }
+
+  public function testSfCopyDir_上書きフラグがONの場合_同名ファイルが上書きされる() {
+    mkdir(self::$TMP_DIR . "/src", 0777, true);
+    mkdir(self::$TMP_DIR . "/dst", 0777, true); // コピー先も作成しておく
+    $fp = fopen(self::$TMP_DIR . "/src/test.txt", "w");
+    fwrite($fp, "hello");
+    fclose($fp);
+
+    // 上書きされるファイル
+    $fp = fopen(self::$TMP_DIR . "/dst/test.txt", "w");
+    fwrite($fp, "good morning");
+    fclose($fp);
+
+    $src = self::$TMP_DIR . "/src/";
+    $dst = self::$TMP_DIR . "/dst/";
+
+    $this->expected = array(
+      'dir_exists' => TRUE,
+      'files' => array('test.txt'),
+      'file_content' => 'hello'
+    );
+    SC_Utils::sfCopyDir($src, $dst, '', TRUE);
+    $this->actual['dir_exists'] = is_dir($dst);
+    $this->actual['files'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst), 'file_name');
+    $fp = fopen(self::$TMP_DIR . "/dst/test.txt", "r");
+    $this->actual['file_content'] = fread($fp, 100);
+
+    $this->verify();
+  }
+
+  public function testSfCopyDir_上書きフラグがONかつ書き込み権限がない場合_同名ファイルが上書きされない() {
+    mkdir(self::$TMP_DIR . "/src", 0777, true);
+    mkdir(self::$TMP_DIR . "/dst", 0777, true); // コピー先も作成しておく
+    $fp = fopen(self::$TMP_DIR . "/src/test.txt", "w");
+    fwrite($fp, "hello");
+    fclose($fp);
+
+    // 上書きされないファイル
+    $test_file = self::$TMP_DIR . "/dst/test.txt";
+    $fp = fopen($test_file, "w");
+    fwrite($fp, "good morning");
+    fclose($fp);
+    chmod($test_file, 0444); // いったん読取専用にする
+
+    $src = self::$TMP_DIR . "/src/";
+    $dst = self::$TMP_DIR . "/dst/";
+
+    $this->expected = array(
+      'dir_exists' => TRUE,
+      'files' => array('test.txt'),
+      'file_content' => 'good morning'
+    );
+    SC_Utils::sfCopyDir($src, $dst, '', TRUE);
+    $this->actual['dir_exists'] = is_dir($dst);
+    $this->actual['files'] = Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList($dst), 'file_name');
+    $fp = fopen($test_file, "r");
+    $this->actual['file_content'] = fread($fp, 100);
+
+    chmod($test_file, 0777); // verifyする前にパーミッションを戻す
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsSucceessTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsSucceessTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsSucceessTest.php	(revision 22278)
@@ -0,0 +1,102 @@
+<?php
+
+$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_Utils::sfIsSuccess()のテストクラス.
+ * TODO exitするケースはテスト不可
+ * TODO HTTPSのケースは未テスト(config.phpでhttpsのURLが指定されていないため)
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfIsSuccessTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfIsSuccess_認証に失敗している場合_falseが返る() {
+    $objSess = new SC_Session_Mock();
+    $objSess->is_success = SUCCESS + 1;
+
+    $this->expected = FALSE;
+    $this->actual = SC_Utils::sfIsSuccess($objSess, FALSE);
+
+    $this->verify('認証可否');
+  }
+
+  public function testSfIsSuccess_認証成功でリファラがない場合_trueが返る() {
+    $objSess = new SC_Session_Mock();
+    $objSess->is_success = SUCCESS;
+
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsSuccess($objSess);
+
+    $this->verify('認証可否');
+  }
+
+  // TODO 正規のドメインであることは確認しているが、管理画面からというのはチェックしていないのでは？
+  public function testSfIsSuccess_認証成功でリファラが正しい場合_trueが返る() {
+    $objSess = new SC_Session_Mock();
+    $objSess->is_success = SUCCESS;
+    $_SERVER['HTTP_REFERER'] = 'http://test.local/hoge/fuga';
+
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsSuccess($objSess, FALSE);
+
+    $this->verify('認証可否');
+  }
+
+  public function testSfIsSuccess_認証成功でリファラが不正な場合_falseが返る() {
+    $objSess = new SC_Session_Mock();
+    $objSess->is_success = SUCCESS;
+    $_SERVER['HTTP_REFERER'] = 'http://test.jp.local/hoge/fuga';
+
+    $this->expected = FALSE;
+    $this->actual = SC_Utils::sfIsSuccess($objSess, FALSE);
+
+    $this->verify('認証可否');
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Session_Mock extends SC_Session {
+
+  public $is_success;
+
+  function IsSuccess() {
+    return $this->is_success;
+  }
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTermMonthTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTermMonthTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTermMonthTest.php	(revision 22278)
@@ -0,0 +1,77 @@
+<?php
+
+$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_Utils::sfTermMonth()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfTermMonthTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfTermMonth_締め日が月末より早い場合_設定した締め日の通りになる() {
+    $this->expected = array('2012/9/16', '2012/10/15 23:59:59');
+    $this->actual = SC_Utils::sfTermMonth(2012, 10, 15);
+
+    $this->verify();
+  }
+
+  public function testSfTermMonth_該当月の末日が締め日より早い場合_末日に合わせられる() {
+    $this->expected = array('2012/9/1', '2012/9/30 23:59:59');
+    $this->actual = SC_Utils::sfTermMonth(2012, 9, 31);
+
+    $this->verify();
+  }
+
+  public function testSfTermMonth_前月の末日が締め日より早い場合_末日に合わせられる() {
+    $this->expected = array('2012/10/1', '2012/10/31 23:59:59');
+    $this->actual = SC_Utils::sfTermMonth(2012, 10, 31);
+
+    $this->verify();
+  }
+
+  public function testSfTermMonth_年をまたぐ場合_前月が前年十二月になる() {
+    $this->expected = array('2012/12/16', '2013/1/15 23:59:59');
+    $this->actual = SC_Utils::sfTermMonth(2013, 1, 15);
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php	(revision 22278)
@@ -0,0 +1,184 @@
+<?php
+
+$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_Utils::sfGetAddress()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetAddressTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpAddress();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function test_住所がヒットしない場合_空の配列が返る() {
+    $this->expected = array();
+    $this->actual = SC_Utils::sfGetAddress('9999999');
+
+    $this->verify('郵便番号検索結果');
+  }
+
+  public function test_住所が一件だけヒットする場合_住所データが取得できる() {
+    $this->expected = array(
+      array(
+        'state' => '1',    // 北海道
+        'city' => '札幌市中央区',
+        'town' => '大通東'
+      )
+    );
+    $this->actual = SC_Utils::sfGetAddress('0600041');
+
+    $this->verify('郵便番号検索結果');
+  }
+
+  // TODO 二件目に関しては件名のIDへの変換と町名の削除が行われない。
+  // 今の仕様ではこれでOKかもしれないが、そもそも一件目しか使わないのなら
+  // $data_list[0]を返した方が良いのでは?
+  /**
+  public function test_住所が二件以上ヒットする場合_町名を消した住所データが取得できる() {
+    $this->expected = array(
+      array(
+        'state' => '5',    // 秋田県
+        'city' => '秋田市',
+        'town' => ''
+      ),
+      array(
+        'state' => '5',
+        'city' => '秋田市',
+        'town' => ''
+      )
+    );
+    $this->actual = SC_Utils::sfGetAddress('0110951');
+
+    $this->verify('郵便番号検索結果');
+  }
+  */
+
+  public function test_住所に但し書きが含まれる場合_但し書きが消去される() {
+    $this->expected = array(
+      array(
+        'state' => '1',    // 北海道
+        'city' => '札幌市中央区',
+        'town' => '大通西'
+      )
+    );
+    $this->actual = SC_Utils::sfGetAddress('0600042');
+
+    $this->verify('郵便番号検索結果');
+  }
+
+  public function test_住所に注意文言がある場合_町名が消去される() {
+    $this->expected = array(
+      array(
+        'state' => '1',    // 北海道
+        'city' => '札幌市中央区',
+        'town' => ''
+      )
+    );
+    $this->actual = SC_Utils::sfGetAddress('0600000');
+
+    $this->verify('郵便番号検索結果');
+  }
+
+  public function test_住所に番地の説明が含まれる場合_町名が消去される() {
+    $this->expected = array(
+      array(
+        'state' => '8',    // 茨城県
+        'city' => '猿島郡堺町',
+        'town' => ''
+      )
+    );
+    $this->actual = SC_Utils::sfGetAddress('3060433');
+
+    $this->verify('郵便番号検索結果');
+  }
+
+  //////////////////////////////////////////
+
+  protected function setUpAddress() {
+
+    $address = array(
+      array(
+        'zip_id' => '2',
+        'zipcode' => '0600041',
+        'state' => '北海道',
+        'city' => '札幌市中央区',
+        'town' => '大通東'
+      ),
+      array(
+        'zip_id' => '3',
+        'zipcode' => '0600042',
+        'state' => '北海道',
+        'city' => '札幌市中央区',
+        'town' => '大通西（１〜１９丁目）'
+      ),
+      array(
+        'zip_id' => '0',
+        'zipcode' => '0600000',
+        'state' => '北海道',
+        'city' => '札幌市中央区',
+        'town' => '以下に掲載がない場合'
+      ),
+      array(
+        'zip_id' => '26867',
+        'zipcode' => '3060433',
+        'state' => '茨城県',
+        'city' => '猿島郡堺町',
+        'town' => '堺町の次に番地がくる場合'
+      ),
+      array(
+        'zip_id' => '16223',
+        'zipcode' => '0110951',
+        'state' => '秋田県',
+        'city' => '秋田市',
+        'town' => '土崎港相染町'
+      ),
+      array(
+        'zip_id' => '16226',
+        'zipcode' => '0110951',
+        'state' => '秋田県',
+        'city' => '秋田市',
+        'town' => '土崎港古川町'
+      )
+    );
+
+    $this->objQuery->delete('mtb_zip');
+    foreach ($address as $item) {
+      $this->objQuery->insert('mtb_zip', $item);
+    }
+  }
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypeHmacTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypeHmacTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypeHmacTest.php	(revision 22278)
@@ -0,0 +1,81 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// このテスト専用の定数の設定
+define('AUTH_TYPE', 'HMAC');
+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_Utils::sfIsMatchHashPassword()のテストクラス.
+ * 暗号化の詳細については特にテストしていない.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfIsMatchHashPassword_authTypeHmacTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfIsMatchHashPassword_ハッシュ化後の文字列が一致する場合_trueが返る() {
+    $pass = 'ec-cube';
+    $salt = 'salt';
+    $hashpass = SC_Utils_Ex::sfGetHashString($pass, $salt);
+
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass, $salt);
+
+    $this->verify('パスワード文字列比較結果');
+  }
+
+  public function testSfIsMatchHashPassword_ハッシュ化後の文字列が一致しない場合_falseが返る() {
+    $pass = 'ec-cube';
+    $salt = 'salt';
+    $hashpass = 'ec-cube';
+
+    $this->expected = FALSE;
+    $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass, $salt);
+
+    $this->verify('パスワード文字列比較結果');
+  }
+
+  public function testSfIsMatchHashPassword_saltが未指定の場合_旧バージョンの暗号化で比較される() {
+    $pass = 'ec-cube';
+    $hashpass = sha1($pass . ':' . AUTH_MAGIC);
+
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass);
+
+    $this->verify('パスワード文字列比較結果');
+  }
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_copyDirectoryTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_copyDirectoryTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_copyDirectoryTest.php	(revision 22278)
@@ -0,0 +1,160 @@
+<?php
+
+$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_Utils::copyDirectory()のテストクラス.
+ * TODO : 最後にスラッシュがないとうまくいかないのは良いのか？
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_copyDirectoryTest extends Common_TestCase {
+
+  static $TMP_DIR;
+
+  protected function setUp() {
+    // parent::setUp();
+    self::$TMP_DIR = realpath(dirname(__FILE__)) . "/../../../tmp";
+    SC_Helper_FileManager::deleteFile(self::$TMP_DIR);
+    mkdir(self::$TMP_DIR, 0700, true);
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testCopyDirectory_存在するパスの場合_指定したパス以下が再帰的にコピーされる() {
+    /**
+     * tests/tmp/src
+     *             /dir10
+     *             /dir20/dir21
+     *                   /file22.txt
+     */
+    mkdir(self::$TMP_DIR . "/src", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir10", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20/dir21", 0700, true);
+    $fp = fopen(self::$TMP_DIR . "/src/dir20/file22.txt", "w");
+    fwrite($fp, "ec-cube test");
+    fclose($fp);
+    mkdir(self::$TMP_DIR . "/dst");
+
+    SC_Utils::copyDirectory(self::$TMP_DIR . "/src/", self::$TMP_DIR . "/dst/");
+
+    $this->expected = array("dir10", "dir20", "dir21", "file22.txt");
+    $this->actual = array();
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst"), "file_name"));
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst/dir20"), "file_name"));
+    
+    $this->verify('コピーされたファイル一覧');
+  }
+
+  public function testCopyDirectory_存在しないパスの場合_何も起こらない() {
+    /**
+     * tests/tmp/src
+     *             /dir10
+     *             /dir20/dir21
+     *                   /file22.txt
+     */
+    // mkdir(self::$TMP_DIR . "/src", 0700, true);
+    mkdir(self::$TMP_DIR . "/dst");
+
+    SC_Utils::copyDirectory(self::$TMP_DIR . "/src/", self::$TMP_DIR . "/dst/");
+
+    $this->expected = array();
+    $this->actual = array();
+    
+    $this->verify('コピーされたファイル一覧');
+  }
+
+  public function testCopyDirectory_コピー先のディレクトリが元々存在する場合_上書きされる() {
+    /**
+     * tests/tmp/src
+     *             /dir10
+     *             /dir20/dir21
+     *                   /file22.txt
+     */
+    mkdir(self::$TMP_DIR . "/src", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir10", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20/dir21", 0700, true);
+    $fp = fopen(self::$TMP_DIR . "/src/dir20/file22.txt", "w");
+    fwrite($fp, "ec-cube test");
+    fclose($fp);
+    mkdir(self::$TMP_DIR . "/dst");
+    mkdir(self::$TMP_DIR . "/dst/dir20/dir23", 0700, true);
+
+    SC_Utils::copyDirectory(self::$TMP_DIR . "/src/", self::$TMP_DIR . "/dst/");
+
+    $this->expected = array("dir10", "dir20", "dir21", "dir23", "file22.txt");
+    $this->actual = array();
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst"), "file_name"));
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst/dir20"), "file_name"));
+    
+    $this->verify('コピー先のファイル一覧');
+
+  }
+
+  public function testCopyDirectory_コピー先のファイルが元々存在する場合_上書きされる() {
+    /**
+     * tests/tmp/src
+     *             /dir10
+     *             /dir20/dir21
+     *                   /file22.txt
+     */
+    mkdir(self::$TMP_DIR . "/src", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir10", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20", 0700, true);
+    mkdir(self::$TMP_DIR . "/src/dir20/dir21", 0700, true);
+    $fp = fopen(self::$TMP_DIR . "/src/dir20/file22.txt", "w");
+    fwrite($fp, "ec-cube test");
+    fclose($fp);
+    mkdir(self::$TMP_DIR . "/dst");
+    mkdir(self::$TMP_DIR . "/dst/dir20");
+    $fp_dist = fopen(self::$TMP_DIR . "/dst/dir20/file22.txt", "w");
+    fwrite($fp_dist, "hello");
+    fclose($fp_dist);
+
+    SC_Utils::copyDirectory(self::$TMP_DIR . "/src/", self::$TMP_DIR . "/dst/");
+
+    $this->expected = array("dir10", "dir20", "dir21", "file22.txt", "ec-cube test");
+    $this->actual = array();
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst"), "file_name"));
+    Test_Utils::array_append($this->actual, Test_Utils::mapCols(SC_Helper_FileManager::sfGetFileList(self::$TMP_DIR . "/dst/dir20"), "file_name"));
+    $fp_final = fopen(self::$TMP_DIR . "/dst/dir20/file22.txt", "r");
+    $read_result = fread($fp_final, 100);
+    fclose($fp_final);
+    $this->actual[] = $read_result;
+
+    $this->verify('コピー先のファイル一覧');
+
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetClassCatCountTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetClassCatCountTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetClassCatCountTest.php	(revision 22278)
@@ -0,0 +1,131 @@
+<?php
+
+$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_Utils::sfGetClassCatCount()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetClassCatCountTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpClassCat();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfGetClassCatCount__規格分類の件数がIDごとに取得できる() {
+    
+    $this->expected = array(
+      '1001' => '2',
+      '1002' => '1'
+    );
+    $this->actual = SC_Utils::sfGetClassCatCount();
+
+    $this->verify('規格分類の件数');
+  }
+
+  //////////////////////////////////////////
+
+  protected function setUpClassCat() {
+    $classes = array(
+      array(
+        'class_id' => '1001',
+        'name' => '味',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP',
+        'del_flg' => '0'
+      ),
+      array(
+        'class_id' => '1002',
+        'name' => '大きさ',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP',
+        'del_flg' => '0'
+      ),
+      // 削除フラグが立っているので検索されない
+      array(
+        'class_id' => '1003',
+        'name' => '匂い',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP',
+        'del_flg' => '1'
+      )
+    );
+    $this->objQuery->delete('dtb_class');
+    foreach ($classes as $item) {
+      $this->objQuery->insert('dtb_class', $item);
+    }
+
+    $class_categories = array(
+      array(
+        'classcategory_id' => '1011',
+        'class_id' => '1001',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      ),
+      // 削除フラグが立っているので検索されない
+      array(
+        'classcategory_id' => '1012',
+        'class_id' => '1001',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP',
+        'del_flg' => '1'
+      ),
+      array(
+        'classcategory_id' => '1013',
+        'class_id' => '1001',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      ),
+      array(
+        'classcategory_id' => '1021',
+        'class_id' => '1002',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      ),
+      // dtb_classでdel_flgが立っているので検索されない
+      array(
+        'classcategory_id' => '1031',
+        'class_id' => '1003',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+    );
+    $this->objQuery->delete('dtb_classcategory');
+    foreach ($class_categories as $item) {
+      $this->objQuery->insert('dtb_classcategory', $item);
+    }
+  }
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_clearCompliedTemplateTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_clearCompliedTemplateTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_clearCompliedTemplateTest.php	(revision 22278)
@@ -0,0 +1,62 @@
+<?php
+
+$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_Utils::clearCompliedTemplate()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_clearCompliedTemplateTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function test__コンパイル済みのファイルを配置するディレクトリが空になる() {
+    SC_Utils::clearCompliedTemplate();
+
+    $this->expected = array();
+    $this->actual = array();
+    Test_Utils::array_append($this->actual, COMPILE_REALDIR);
+    Test_Utils::array_append($this->actual, COMPILE_ADMIN_REALDIR);
+    Test_Utils::array_append($this->actual, SMARTPHONE_COMPILE_REALDIR);
+    Test_Utils::array_append($this->actual, MOBILE_COMPILE_REALDIR);
+
+    $this->verify('コンパイル済みファイルの格納先の中身');
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetProductClassIdTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetProductClassIdTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetProductClassIdTest.php	(revision 22278)
@@ -0,0 +1,98 @@
+<?php
+
+$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_Utils::sfGetProductClassId()のテストクラス.
+ * TODO del_flgは使わなくて良い？？
+ * TODO classcategory_id1とclasscategory_id2を使わないと一意に指定できない。
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetProductClassIdTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpProductsClass();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfGetProductClassId_存在するIDを指定した場合_対応する製品クラスが取得できる() {
+    
+    $this->expected = '1001';
+    $this->actual = SC_Utils::sfGetProductClassId('1001');
+
+    $this->verify('取得した製品クラス');
+  }
+
+  public function testSfGetProductClassId_存在しないIDを指定した場合_nullが返る() {
+    $this->expected = null;
+    $this->actual = SC_Utils::sfGetProductClassId('9999');
+
+    $this->verify('取得結果が空');
+  }
+
+  //////////////////////////////////////////
+  protected function setUpProductsClass() {
+    $products_class = array(
+      array(
+        'product_class_id' => '2001',
+        'product_id' => '2001',
+        'price02' => '1000',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      ),
+      array(
+        'product_class_id' => '1001',
+        'product_id' => '1001',
+        'price02' => '1000',
+        'classcategory_id1' => '1',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+      /** 同じproduct_idが2つあるケースは現状failするのでいったんコメントアウト
+      array(
+        'product_class_id' => '1002',
+        'product_id' => '1001',
+        'price02' => '1000',
+        'classcategory_id1' => '2',
+        'creator_id' => '1',
+        'update_date' => 'CURRENT_TIMESTAMP'
+      )
+      */
+    );
+
+    $this->objQuery->delete('dtb_products_class');
+    foreach ($products_class as $item) {
+      $this->objQuery->insert('dtb_products_class', $item);
+    }
+  }
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php	(revision 22278)
@@ -0,0 +1,70 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// このテスト専用の定数の設定
+define('AUTH_TYPE', 'PLAIN');
+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_Utils::sfIsMatchHashPassword()のテストクラス.
+ * TODO まとめて実行する場合は定数の変更ができないためNG
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfIsMatchHashPassword_authTypePlainTest extends Common_TestCase {
+
+
+  protected function setUp() {
+    // parent::setUp();
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  /**
+  public function testSfIsMatchHashPassword_文字列が一致する場合_trueが返る() {
+    $pass = 'ec-cube';
+    $hashpass = 'ec-cube';
+
+    $this->expected = TRUE;
+    $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass);
+
+    $this->verify('パスワード文字列比較結果');
+  }
+
+  public function testSfIsMatchHashPassword_文字列が一致しない場合_falseが返る() {
+    $pass = 'ec-cube';
+    $hashpass = 'EC-cube';
+
+    $this->expected = FALSE;
+    $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass);
+
+    $this->verify('パスワード文字列比較結果');
+  }
+  */
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrKeyValueTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrKeyValueTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrKeyValueTest.php	(revision 22278)
@@ -0,0 +1,101 @@
+<?php
+
+$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_Utils::sfArrKeyValue()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfArrKeyValueTest extends Common_TestCase {
+
+  var $arrList;
+  var $keyname;
+  var $valuename;
+
+  protected function setUp() {
+    // parent::setUp();
+
+    $this->arrList = array(
+      array('testkey' => '1011', 'testvalue' => '2001', 'key' => '3001'),
+      array('testkey' => '2022', 'testvalue' => '2002', 'key' => '3002'),
+      array('testkey' => '3033', 'testvalue' => '2003', 'key' => '3003'),
+      array('testkey' => '4044', 'testvalue' => '2004', 'key' => '3004')
+    );
+    $this->keyname = 'testkey';
+    $this->valuename = 'testvalue';
+  }
+
+  protected function tearDown() {
+    // parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfArrKeyValue_最大長が配列より短い場合_最大長でカットされる() {
+    $len_max = 3;
+
+    $this->expected = array(
+      '1011' => '2001',
+      '2022' => '2002',
+      '3033' => '2003'
+    );
+    $this->actual = SC_Utils::sfArrKeyValue($this->arrList, $this->keyname, $this->valuename, $len_max);
+
+    $this->verify();
+  }
+
+  public function testSfArrKeyValue_最大長が指定されていない場合_全要素が出力される() {
+    $this->expected = array(
+      '1011' => '2001',
+      '2022' => '2002',
+      '3033' => '2003',
+      '4044' => '2004'
+    );
+    $this->actual = SC_Utils::sfArrKeyValue($this->arrList, $this->keyname, $this->valuename, $len_max);
+
+    $this->verify();
+  }
+
+  public function testSfArrKeyValue_キーサイズが短い場合_キーサイズでカットされる() {
+    $len_max = 5;
+    $keysize = 1;
+
+    $this->expected = array(
+      '1...' => '2001',
+      '2...' => '2002',
+      '3...' => '2003',
+      '4...' => '2004'
+    );
+    $this->actual = SC_Utils::sfArrKeyValue($this->arrList, $this->keyname, $this->valuename, $len_max, $keysize);
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php	(revision 22278)
@@ -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-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php	(revision 22278)
@@ -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: anches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php	(revision 22144)
+++ 	(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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempForSoleTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempForSoleTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempForSoleTest.php	(revision 22278)
@@ -0,0 +1,91 @@
+<?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::setShipmentItemTempForSole()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_setShipmentItemTempForSoleTest extends SC_Helper_Purchase_TestBase {
+
+
+  protected function setUp() {
+    parent::setUp();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+    $_SESSION['testResult'] = null;
+  }
+
+  /////////////////////////////////////////
+  public function testSetShipmentItemTempForSole__いったん配送情報がクリアされたあと改めて指定のものが設定される() {
+    $helper = new SC_Helper_Purchase_setShipmentItemTempForSoleMock();
+    $cartSession = new SC_CartSession_setShipmentItemTempForSoleMock();
+    $shipping_id = '1001';
+
+    $helper->setShipmentItemTempForSole($cartSession, $shipping_id);
+
+    $this->expected = array(
+      'clearShipmentItemTemp' => TRUE,
+      'shipmentItemTemp' => array(
+        array('shipping_id'=>'1001', 'id'=>'1', 'quantity'=>'10'),
+        array('shipping_id'=>'1001', 'id'=>'2', 'quantity'=>'5')
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Helper_Purchase_setShipmentItemTempForSoleMock extends SC_Helper_Purchase {
+  function clearShipmentItemTemp() {
+    $_SESSION['testResult']['clearShipmentItemTemp'] = TRUE;
+  }
+
+  function setShipmentItemTemp($shipping_id, $id, $quantity) {
+    $_SESSION['testResult']['shipmentItemTemp'][] = 
+      array('shipping_id' => $shipping_id, 'id' => $id, 'quantity' => $quantity);
+  }
+}
+
+class SC_CartSession_setShipmentItemTempForSoleMock extends SC_CartSession {
+  function getCartList($key) {
+    return array(
+      array('id'=>'1', 'quantity'=>'10'),
+      array('id'=>'2', 'quantity'=>'5'),
+      array('id'=>'3', 'quantity'=>'0')
+    );
+  }
+}
+
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_completeOrderTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_completeOrderTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_completeOrderTest.php	(revision 22278)
@@ -0,0 +1,180 @@
+<?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::completeOrder()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_completeOrderTest extends SC_Helper_Purchase_TestBase {
+
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrderTemp(); // order_temp_id = '1001'
+    $this->setUpShipping();
+    $this->setUpCustomer();
+
+    $_SESSION['cartKey'] = '1';
+    $_SESSION['site'] = array(
+      'pre_page' => 'pre',
+      'now_page' => 'now',
+      'regist_success' => TRUE,
+      'uniqid' => '1001'
+    );
+
+    $this->helper = new SC_Helper_Purchase_completeOrderMock();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  // 適切なfunctionが呼ばれていることのみ確認
+  public function testCompleteOrder_顧客IDが指定されている場合_購入日が更新される() {
+    $_SESSION['customer']['customer_id'] = '1002'; // 顧客ID
+    $this->helper->completeOrder(ORDER_DELIV);
+
+    $this->expected = array(
+      'verifyChangeCart' => array(
+        'uniqId' => '1001'
+      ),
+      'getOrderTemp' => array(
+        'uniqId' => '1001'
+      ),
+      'registerOrderComplete' => array(
+        'order_temp_id' => '1001',
+        'status' => ORDER_DELIV,
+        'cartKey' => '1'
+      ),
+      'registerShipmentItem' => array(
+        array(
+          'order_id' => '1001',
+          'shipping_id' => '00001',
+          'shipment_item' => '商品1'
+        )
+      ),
+      'registerShipping' => array(
+        'order_id' => '1001'
+      ),
+      'cleanupSession' => array(
+        'order_id' => '1001',
+        'cartKey' => '1'
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+    $this->verify('適切なfunctionが呼ばれている');
+    $last_buy_date = $this->objQuery->get('last_buy_date', 'dtb_customer', 'customer_id = ?', '1002');
+    $this->assertNotNull($last_buy_date, '最終購入日');
+  }
+
+  public function testCompleteOrder_顧客IDが指定されていない場合_特にエラーなく修了できる() {
+    $this->helper->completeOrder(); // デフォルトのステータス(NEW)
+
+    $this->expected = array(
+      'verifyChangeCart' => array(
+        'uniqId' => '1001'
+      ),
+      'getOrderTemp' => array(
+        'uniqId' => '1001'
+      ),
+      'registerOrderComplete' => array(
+        'order_temp_id' => '1001',
+        'status' => ORDER_NEW,
+        'cartKey' => '1'
+      ),
+      'registerShipmentItem' => array(
+        array(
+          'order_id' => '1001',
+          'shipping_id' => '00001',
+          'shipment_item' => '商品1'
+        )
+      ),
+      'registerShipping' => array(
+        'order_id' => '1001'
+      ),
+      'cleanupSession' => array(
+        'order_id' => '1001',
+        'cartKey' => '1'
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+    $this->verify('適切なfunctionが呼ばれている');
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Helper_Purchase_completeOrderMock extends SC_Helper_Purchase{
+
+  function verifyChangeCart($uniqId, $objCartSession){
+    $_SESSION['testResult']['verifyChangeCart'] = array('uniqId'=>$uniqId);
+  }
+
+  function getOrderTemp($uniqId) {
+    $_SESSION['testResult']['getOrderTemp'] = array('uniqId'=>$uniqId);
+    return parent::getOrderTemp($uniqId);
+  }
+
+  function registerOrderComplete($orderTemp, $objCartSession, $cartKey) {
+    $_SESSION['testResult']['registerOrderComplete'] = array(
+      'order_temp_id' => $orderTemp['order_temp_id'],
+      'status' => $orderTemp['status'],
+      'cartKey' => $cartKey
+    );
+    return parent::registerOrderComplete($orderTemp, $objCartSession, $cartKey);
+  }
+
+  function registerShipmentItem($order_id, $shipping_id, $shipment_item) {
+    $_SESSION['testResult']['registerShipmentItem'][] = array(
+      'order_id' => $order_id,
+      'shipping_id' => $shipping_id,
+      'shipment_item' => $shipment_item
+    );
+  }
+
+  function registerShipping($order_id, $shipping_temp) {
+    $_SESSION['testResult']['registerShipping'] = array(
+      'order_id' => $order_id
+    );
+  }
+
+  function cleanupSession($order_id, $objCartSesion, $objCustomer, $cartKey) {
+    $_SESSION['testResult']['cleanupSession'] = array(
+      'order_id' => $order_id,
+      'cartKey' => $cartKey
+    );
+  }
+
+}
+
+?>
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setShipmentItemTempTest.php	(revision 22278)
@@ -0,0 +1,89 @@
+<?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::setShipmentItemTemp()のテストクラス.
+ * 【注意】dtb_baseinfoはインストール時に入るデータをそのまま使用
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_setShipmentItemTempTest extends SC_Helper_Purchase_TestBase {
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpProductClass();
+    $this->setUpProducts();
+
+    $_SESSION['shipping']['1001']['shipment_item'] = array(
+      '1001' => array('productsClass' => array('price02' => 9000))
+    );
+    $this->helper = new SC_Helper_Purchase();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSetShipmentItemTemp_製品情報が既に存在する場合_存在する情報が価格に反映される() {
+    $this->helper->setShipmentItemTemp('1001', '1001', 10);
+
+    $this->expected = array(
+      'shipping_id' => '1001',
+      'product_class_id' => '1001',
+      'quantity' => 10,
+      'price' => 9000,
+      'total_inctax' => 94500.0,
+      'productsClass' => array('price02' => 9000)
+    );
+    $this->actual = $_SESSION['shipping']['1001']['shipment_item']['1001'];
+
+    $this->verify();
+  }
+
+  public function testSetShipmentItemTemp_製品情報が存在しない場合_DBから取得した値が反映される() {
+    $this->helper->setShipmentItemTemp('1001', '1002', 10);
+
+    $this->expected = array(
+      'shipping_id' => '1001',
+      'product_class_id' => '1002',
+      'quantity' => 10,
+      'price' => '2500',
+      'total_inctax' => 26250.0
+    );
+    $result = $_SESSION['shipping']['1001']['shipment_item']['1002'];
+    unset($result['productsClass']);
+    $this->actual = $result;
+
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_extractShippingTest.php	(revision 22278)
@@ -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();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php	(revision 22278)
@@ -3,8 +3,34 @@
 $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_registerShippingTempTest extends SC_Helper_Purchase_TestBase {
+class SC_Helper_Purchase_registerShippingTest extends SC_Helper_Purchase_TestBase {
 
   protected function setUp() {
@@ -30,5 +56,5 @@
     );
  
-    $this->expected['count'] = '3'; // 1件増える
+    $this->expected['count'] = '4'; // 1件増える
     $this->expected['content'] = array(
         'order_id' => '10',
@@ -67,5 +93,5 @@
     );
 
-    $this->expected['count'] = '2'; // 件数が変わらない
+    $this->expected['count'] = '3'; // 件数が変わらない
     $this->expected['content'] = array(
         'order_id' => '2',
@@ -104,5 +130,5 @@
     );
 
-    $this->expected['count'] = '2';
+    $this->expected['count'] = '3';
     $this->expected['content'] = array(
         'order_id' => '2',
@@ -141,5 +167,5 @@
     );
 
-    $this->expected['count'] = '2'; // 件数が変わらない
+    $this->expected['count'] = '3'; // 件数が変わらない
     $this->expected['content'] = array(
         'order_id' => '2',
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderDetailTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderNameColTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderNameColTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderNameColTest.php	(revision 22278)
@@ -0,0 +1,99 @@
+<?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::sfUpdateOrderNameCol()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_sfUpdateOrderNameColTest extends SC_Helper_Purchase_TestBase {
+  var $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrder();
+    $this->setUpOrderTemp();
+    $this->setUpPayment();
+    $this->setUpDeliv();
+    $this->setUpDelivTime();
+    $this->setUpShippingOnDb();
+
+    $this->helper = new SC_Helper_Purchase();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testSfUpdateOrderNameCol_TEMPフラグがOFFの場合_受注テーブルと発送テーブルが更新される() {
+    $order_id = '1002';
+
+    $this->helper->sfUpdateOrderNameCol($order_id);
+
+    $this->expected['shipping'] = array(array('shipping_time' => '午前'));
+    $this->expected['order'] = array(array('payment_method' => '支払方法1002'));
+    $this->expected['order_temp'] = array(array('payment_method' => '支払方法1001')); // 変更されていない
+
+    $this->actual['shipping'] = $this->objQuery->select(
+      'shipping_time', 'dtb_shipping', 'order_id = ?', array($order_id)
+    );
+    $this->actual['order'] = $this->objQuery->select(
+      'payment_method', 'dtb_order', 'order_id = ?', array($order_id)
+    );
+    $this->actual['order_temp'] = $this->objQuery->select(
+      'payment_method', 'dtb_order_temp', 'order_temp_id = ?', array($order_id)
+    );
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderNameCol_TEMPフラグがONの場合_一時テーブルが更新される() {
+    $order_id = '1002';
+
+    $this->helper->sfUpdateOrderNameCol($order_id, true);
+
+    $this->expected['shipping'] = array(array('shipping_time' => '午後')); // 変更されていない
+    $this->expected['order'] = array(array('payment_method' => '支払方法1001')); // 変更されていない
+    $this->expected['order_temp'] = array(array('payment_method' => '支払方法1002'));
+
+    $this->actual['shipping'] = $this->objQuery->select(
+      'shipping_time', 'dtb_shipping', 'order_id = ?', array($order_id)
+    );
+    $this->actual['order'] = $this->objQuery->select(
+      'payment_method', 'dtb_order', 'order_id = ?', array($order_id)
+    );
+    $this->actual['order_temp'] = $this->objQuery->select(
+      'payment_method', 'dtb_order_temp', 'order_temp_id = ?', array($order_id)
+    );
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderCompleteTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderCompleteTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderCompleteTest.php	(revision 22278)
@@ -0,0 +1,168 @@
+<?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::registerOrderComplete()のテストクラス.
+ * TODO 在庫の減少処理はエラー表示⇒exit呼び出しとなるためテスト不可.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+
+class SC_Helper_Purchase_registerOrderCompleteTest extends SC_Helper_Purchase_TestBase {
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrderTemp();
+    $this->helper = new SC_Helper_Purchase_registerOrderCompleteMock();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testRegisterOrderComplete_不要な変数が含まれている場合_登録前に除外される() {
+    // 引数の準備
+    $orderParams = array(
+      'order_id' => '1001',
+      'status' => ORDER_PAY_WAIT,
+      'mail_maga_flg' => '1',
+      'order_tax_rate' => '5',
+      'order_tax_rule' => '1'
+    );
+    $cartSession = new SC_CartSession_registerOrderCompleteMock();
+    $_SESSION['site']['uniqid'] = '1001';
+
+    $this->helper->registerOrderComplete($orderParams, $cartSession, '1');
+ 
+    $this->expected = array(
+      'registerOrder' => array(
+        'order_id' => '1001',
+        'status' => ORDER_PAY_WAIT,
+        'mailmaga_flg' => null
+      ),
+      'registerOrderDetail' => array(
+        'order_id' => '1001',
+        'params' => array(
+          array(
+            'order_id' => '1001',
+            'product_id' => '1002',
+            'product_class_id' => '1002',
+            'product_name' => '製品02',
+            'product_code' => 'cd1002',
+            'classcategory_name1' => 'cat01',
+            'classcategory_name2' => 'cat02',
+            'point_rate' => '5',
+            'price' => '1000',
+            'quantity' => '10',
+            'tax_rate' => '5',
+            'tax_rule' => '1'
+          )
+        )
+      ),
+      'del_flg' => '1'
+    );
+
+    $this->actual = $_SESSION['testResult'];
+    $this->actual['del_flg'] = $this->objQuery->get('del_flg', 'dtb_order_temp', 'order_temp_id = ?', '1001');
+    $this->verify();
+  }
+
+  public function testRegisterOrderComplete_ステータスの指定がない場合_新規受付扱いとなる() {
+    // 引数の準備
+    $orderParams = array(
+      'order_id' => '1001',
+    //  'status' => ORDER_PAY_WAIT,
+      'order_tax_rate' => '5',
+      'order_tax_rule' => '1'
+    );
+    $cartSession = new SC_CartSession_registerOrderCompleteMock();
+    $_SESSION['site']['uniqid'] = '1001';
+
+    $this->helper->registerOrderComplete($orderParams, $cartSession, '1');
+ 
+    // 上の条件と重複する部分は確認を省略
+    $this->expected = array(
+      'registerOrder' => array(
+        'order_id' => '1001',
+        'status' => ORDER_NEW,
+        'mailmaga_flg' => null
+      )
+    );
+
+    $this->actual['registerOrder'] = $_SESSION['testResult']['registerOrder'];
+    $this->verify();
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Helper_Purchase_registerOrderCompleteMock extends SC_Helper_Purchase {
+
+  function registerOrder($order_id, $params) {
+    $_SESSION['testResult']['registerOrder'] = array(
+      'order_id' => $order_id,
+      'status' => $params['status'],
+      'mailmaga_flg' => $params['mailmaga_flg']
+    );
+  }
+
+  function registerOrderDetail($order_id, $params) {
+    $_SESSION['testResult']['registerOrderDetail'] = array(
+      'order_id' => $order_id,
+      'params' => $params
+    );
+  }
+
+  function setUniqId() {}
+}
+
+class SC_CartSession_registerOrderCompleteMock extends SC_CartSession {
+
+  // カートの内容を取得
+  function getCartList($cartKey) {
+    return array(
+      array(
+        'productsClass' => array(
+          'product_id' => '1002',
+          'product_class_id' => '1002',
+          'name' => '製品02',
+          'product_code' => 'cd1002',
+          'classcategory_name1' => 'cat01',
+          'classcategory_name2' => 'cat02'
+        ),
+        'point_rate' => '5',
+        'price' => '1000',
+        'quantity' => '10'
+      )
+    );
+  }
+}
+?>
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php	(revision 22278)
@@ -3,6 +3,31 @@
 $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のテストの基底クラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
  */
 class SC_Helper_Purchase_TestBase extends Common_TestCase {
@@ -22,5 +47,5 @@
   protected function setUpShipping($shipping) {
     if (!$shipping) {
-      $shipping = getSingleShipping(); 
+      $shipping = $this->getSingleShipping(); 
     }
 
@@ -60,4 +85,5 @@
     $shippings = array(
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'shipping_id' => '1',
         'order_id' => '1',
@@ -66,11 +92,20 @@
       ),
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'shipping_id' => '2',
         'order_id' => '2',
         'shipping_name01' => '配送情報02',
         'shipping_date' => '2011-10-01'
+      ),
+      array(
+        'update_date' => '2000-01-01 00:00:00',
+        'shipping_id' => '1002',
+        'order_id' => '1002',
+        'shipping_time' => '午後',
+        'time_id' => '1'
       )
     );
 
+    $this->objQuery->delete('dtb_shipping');
     foreach ($shippings as $key => $item) {
       $this->objQuery->insert('dtb_shipping', $item);
@@ -99,4 +134,5 @@
       );
 
+    $this->objQuery->delete('dtb_shipment_item');
     foreach ($shipping_items as $key => $item) {
       $this->objQuery->insert('dtb_shipment_item', $item);
@@ -111,7 +147,8 @@
       $product_class = array(
         array(
+          'update_date' => '2000-01-01 00:00:00',
           'product_class_id' => '1001',
           'product_id' => '1001',
-          'product_type_id' => '1001',
+          'product_type_id' => '1',
           'product_code' => 'code1001',
           'classcategory_id1' => '1001',
@@ -119,14 +156,19 @@
           'price01' => '1500',
           'price02' => '1500',
+          'creator_id' => '1',
           'del_flg' => '0'
         ),
         array(
+          'update_date' => '2000-01-01 00:00:00',
           'product_class_id' => '1002',
           'product_id' => '1002',
-          'product_type_id' => '1002',
+          'product_type_id' => '2',
+          'price02' => '2500',
+          'creator_id' => '1',
           'del_flg' => '0'
         )
       );
 
+    $this->objQuery->delete('dtb_products_class');
     foreach ($product_class as $key => $item) {
       $this->objQuery->insert('dtb_products_class', $item);
@@ -142,13 +184,20 @@
     $class_category = array(
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'classcategory_id' => '1001',
+        'class_id' => '1',
+        'creator_id' => '1',
         'name' => 'cat1001'
       ),
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'classcategory_id' => '1002',
+        'class_id' => '1',
+        'creator_id' => '1',
         'name' => 'cat1002'
       )
     );
 
+    $this->objQuery->delete('dtb_classcategory');
     foreach ($class_category as $key => $item) {
       $this->objQuery->insert('dtb_classcategory', $item);
@@ -162,17 +211,22 @@
    $products = array(
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'product_id' => '1001',
        'name' => '製品名1001',
        'del_flg' => '0',
+       'creator_id' => '1',
        'status' => '1'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'product_id' => '1002',
        'name' => '製品名1002',
        'del_flg' => '0',
+       'creator_id' => '1',
        'status' => '2'
      )
    );
 
+   $this->objQuery->delete('dtb_products');
    foreach ($products as $key => $item) {
      $this->objQuery->insert('dtb_products', $item);
@@ -227,4 +281,5 @@
    );
 
+   $this->objQuery->delete('dtb_payment_options');
    foreach ($payment_options as $key => $item) {
      $this->objQuery->insert('dtb_payment_options', $item);
@@ -242,5 +297,7 @@
        'name' => '配送業者del',
        'rank' => '1',
-       'del_flg' => '1'
+       'creator_id' => '1',
+       'del_flg' => '1',
+       'update_date' => '2000-01-01 00:00:00'
      ),
      array(
@@ -248,5 +305,7 @@
        'product_type_id' => '1001',
        'name' => '配送業者01',
-       'rank' => '2'
+       'creator_id' => '1',
+       'rank' => '2',
+       'update_date' => '2000-01-01 00:00:00'
      ),
      array(
@@ -254,5 +313,7 @@
        'product_type_id' => '1001',
        'name' => '配送業者02',
-       'rank' => '3'
+       'creator_id' => '1',
+       'rank' => '3',
+       'update_date' => '2000-01-01 00:00:00'
      ),
      array( // 商品種別違い
@@ -260,8 +321,11 @@
        'product_type_id' => '2001',
        'name' => '配送業者21',
-       'rank' => '4'
-     ),
-   );
-
+       'creator_id' => '1',
+       'rank' => '4',
+       'update_date' => '2000-01-01 00:00:00'
+     ),
+   );
+
+   $this->objQuery->delete('dtb_deliv');
    foreach ($deliv as $key => $item) {
      $this->objQuery->insert('dtb_deliv', $item);
@@ -291,4 +355,5 @@
    );
 
+   $this->objQuery->delete('dtb_delivtime');
    foreach ($deliv_time as $key => $item) {
      $this->objQuery->insert('dtb_delivtime', $item);
@@ -302,37 +367,53 @@
    $payment = array(
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '1001',
+       'creator_id' => '1',
        'payment_method' => '支払方法1001'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '1002',
+       'creator_id' => '1',
        'payment_method' => '支払方法1002',
        'del_flg' => '1'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '1003',
+       'creator_id' => '1',
        'payment_method' => '支払方法1003'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '3001',
+       'creator_id' => '1',
        'payment_method' => '支払方法3001',
        'del_flg' => '1'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '3002',
+       'creator_id' => '1',
        'payment_method' => '支払方法3002'
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '3003',
+       'creator_id' => '1',
        'payment_method' => '支払方法3003',
        'rule_max' => 10000
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '3004',
+       'creator_id' => '1',
        'payment_method' => '支払方法3004',
        'upper_rule' => 20000
      ),
      array(
+       'update_date' => '2000-01-01 00:00:00',
        'payment_id' => '3005',
+       'creator_id' => '1',
        'payment_method' => '支払方法3005',
        'rule_max' => 12000,
@@ -341,4 +422,5 @@
    );
 
+   $this->objQuery->delete('dtb_payment');
    foreach ($payment as $key => $item) {
      $this->objQuery->insert('dtb_payment', $item);
@@ -352,17 +434,28 @@
     $order = array(
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'order_id' => '1001',
         'customer_id' => '1001',
         'order_name01' => '受注情報01',
         'status' => '3',
-        'payment_date' => '2032-12-31 01:20:30' // 日付が変わっても良いように、遠い未来に設定
+        'payment_date' => '2032-12-31 01:20:30', // 日付が変わっても良いように、遠い未来に設定
+        'use_point' => '10',
+        'add_point' => '20'
       ),
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'order_id' => '1002',
         'customer_id' => '1002',
-        'order_name01' => '受注情報02'
+        'order_name01' => '受注情報02',
+        'status' => '5',
+        'payment_id' => '1002',
+        'payment_method' => '支払方法1001',
+        'deliv_id' => '1002',
+        'use_point' => '10',
+        'add_point' => '20'
       )
     );
 
+    $this->objQuery->delete('dtb_order');
     foreach ($order as $item) {
       $this->objQuery->insert('dtb_order', $item);
@@ -376,15 +469,21 @@
     $order = array(
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'order_temp_id' => '1001',
         'customer_id' => '1001',
-        'order_name01' => '受注情報01'
+        'order_name01' => '受注情報01',
+        'order_id' => '1001'
       ),
       array(
+        'update_date' => '2000-01-01 00:00:00',
         'order_temp_id' => '1002',
         'customer_id' => '1002',
-        'order_name01' => '受注情報02'
+        'order_name01' => '受注情報02',
+        'payment_id' => '1002',
+        'payment_method' => '支払方法1001'
       )
     );
 
+    $this->objQuery->delete('dtb_order_temp');
     foreach ($order as $item) {
       $this->objQuery->insert('dtb_order_temp', $item);
@@ -408,5 +507,7 @@
        'price' => 3000,
        'quantity' => 10,
-       'point_rate' => 5
+       'point_rate' => 5,
+       'tax_rate' => 5,
+       'tax_rule' => 0
      ),
      array(
@@ -421,5 +522,7 @@
        'price' => 4000,
        'quantity' => 15,
-       'point_rate' => 6
+       'point_rate' => 6,
+       'tax_rate' => 3,
+       'tax_rule' => 1
      ),
      array(
@@ -427,8 +530,10 @@
        'order_id' => '1002',
        'product_id' => '1001',
-       'product_class_id' => '1001'
+       'product_class_id' => '1001',
+       'product_name' => '製品名1003'
      )
    );
 
+   $this->objQuery->delete('dtb_order_detail');
    foreach ($order_detail as $item) {
      $this->objQuery->insert('dtb_order_detail', $item);
@@ -436,4 +541,39 @@
  }
 
+ /**
+  * DBに顧客情報を設定します。
+  */
+ protected function setUpCustomer() {
+   $customer = array(
+     array(
+       'customer_id' => '1001',
+       'name01' => '苗字',
+       'name02' => '名前',
+       'kana01' => 'みょうじ',
+       'kana02' => 'なまえ',
+       'email' => 'test@example.com',
+       'secret_key' => 'hoge',
+       'point' => '100',
+       'update_date' => '2000-01-01 00:00:00'
+     ),
+     array(
+       'customer_id' => '1002',
+       'name01' => '苗字2',
+       'name02' => '名前2',
+       'kana01' => 'みょうじ2',
+       'kana02' => 'なまえ2',
+       'email' => 'test2@example.com',
+       'secret_key' => 'hoge2',
+       'point' => '200',
+       'update_date' => '2000-01-01 00:00:00'
+     )
+   );
+
+   $this->objQuery->delete('dtb_customer');
+   foreach ($customer as $item) {
+     $this->objQuery->insert('dtb_customer', $item);
+   }
+ }
+
 }
 
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php	(revision 22278)
@@ -0,0 +1,366 @@
+<?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::sfUpdateOrderStatus()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_sfUpdateOrderStatusTest extends SC_Helper_Purchase_TestBase {
+
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrder();
+    $this->setUpCustomer();
+    $this->helper = new SC_Helper_Purchase_sfUpdateOrderStatusMock();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  // オプションの引数：対応状況、使用ポイント、加算ポイント
+  public function testSfUpdateOrderStatus_オプションの引数が未指定の場合_DBの値が引き継がれる() {
+    $order_id = '1001';
+    $old_update_date = $this->objQuery->get('update_date', 'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = false;
+    $this->helper->addPoint = false;
+    $this->helper->sfUpdateOrderStatus($order_id); // 引数は最低限だけ指定
+
+    $this->expected = array(
+      'order' => array(
+        'status' => '3',
+        'add_point' => '20',
+        'use_point' => '10'
+      ),
+      'customer' => array(
+        'point' => '100' 
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', '1001'));
+
+    $this->verify();
+
+    $update_date = $this->objQuery->get('update_date', 'dtb_order', 'order_id = ?', array($order_id));
+    $this->assertTrue($update_date > $old_udpate_date, '受注情報が更新されている');
+  }
+
+  // TODO 定数を変更できないためテスト不可
+  /**
+  public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない() {
+
+
+    $this->verify();
+  }
+  */
+
+  public function testSfUpdateOrderStatus_対応状況が発送済みに変更された場合_発送日が更新される() {
+    $order_id = '1001';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = false;
+    $this->helper->addPoint = false;
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_DELIV, 50, 45);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_DELIV,
+        'add_point' => '50',  // 引数の設定どおりになる
+        'use_point' => '45' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '100' // ポイントを使わない 
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', '1001'));
+
+    $this->verify();
+
+    $new_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+    $this->assertUpdate($new_dates, $old_dates, 'update_date', '受注情報');  
+    $this->assertUpdate($new_dates, $old_dates, 'commit_date', '発送日');  
+    $this->assertUpdate($new_dates, $old_dates, 'payment_date', '入金日', false);  
+  }
+
+  public function testSfUpdateOrderStatus_対応状況が入金済みに変更された場合_入金日が更新される() {
+    $order_id = '1002';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = false;
+    $this->helper->addPoint = false;
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_PRE_END, 50, 45);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_PRE_END,
+        'add_point' => '50',  // 引数の設定どおりになる
+        'use_point' => '45' // 引数の設定どおりになる
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+
+    $this->verify();
+
+    $new_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+    $this->assertUpdate($new_dates, $old_dates, 'update_date', '受注情報');  
+    $this->assertUpdate($new_dates, $old_dates, 'commit_date', '発送日', false);  
+    $this->assertUpdate($new_dates, $old_dates, 'payment_date', '入金日');  
+  }
+
+  public function testSfUpdateOrderStatus_変更前の対応状況が利用対象の場合_変更前の使用ポイントを戻す() {
+    $order_id = '1002';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->addPoint = false; // 加算は強制的にfalseにしておく
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_CANCEL, 0, 45);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_CANCEL,
+        'add_point' => '0',  // 引数の設定どおりになる
+        'use_point' => '45' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '210' // 元々200pt+10pt戻す
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', array('1002')));
+
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderStatus_変更後の対応状況が利用対象の場合_変更後の使用ポイントを引く() {
+    $order_id = '1001';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_NEW, 50, 45);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_NEW,
+        'add_point' => '50',  // 引数の設定どおりになる
+        'use_point' => '45' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '55' // 元々100pt→45pt引く
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', array('1001')));
+
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderStatus_変更前の対応状況が加算対象の場合_変更前の加算ポイントを戻す() {
+    $order_id = '1002';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = false; // 使用対象は強制的にfalseにしておく
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_CANCEL, 50, 45);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_CANCEL,
+        'add_point' => '50',  // 引数の設定どおりになる
+        'use_point' => '45' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '180' // 元々200pt→20pt引く
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', array('1002')));
+
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderStatus_変更後の対応状況が加算対象の場合_変更後の加算ポイントを足す() {
+    $order_id = '1001';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_DELIV, 50, 0);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_DELIV,
+        'add_point' => '50',  // 引数の設定どおりになる
+        'use_point' => '0' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '150' // 元々100pt→50pt足す
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', array('1001')));
+
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderStatus_加算ポイントがプラスの場合_会員テーブルが更新される() {
+    $order_id = '1001';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = true;
+    $this->helper->addPoint = true;
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_PRE_END, 40, 25);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_PRE_END,
+        'add_point' => '40',  // 引数の設定どおりになる
+        'use_point' => '25' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '105' // 変更前の状態で-10pt,変更後の状態で+15pt 
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', '1001'));
+
+    $this->verify();
+  }
+
+  public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りている場合_会員テーブルが更新される() {
+    $order_id = '1001';
+    $old_dates = $this->objQuery->select(
+      'update_date, commit_date, payment_date', 
+      'dtb_order', 'order_id = ?', array($order_id));
+
+    $this->helper->usePoint = true;
+    $this->helper->addPoint = true;
+    $this->helper->sfUpdateOrderStatus($order_id, ORDER_PRE_END, 0, 50);
+
+    $this->expected = array(
+      'order' => array(
+        'status' => ORDER_PRE_END,
+        'add_point' => '0',  // 引数の設定どおりになる
+        'use_point' => '50' // 引数の設定どおりになる
+      ),
+      'customer' => array(
+        'point' => '40' // 変更前の状態で-10pt,変更後の状態で-50pt 
+      )
+    );
+    $this->actual['order'] = array_shift($this->objQuery->select(
+      'status, use_point, add_point',
+      'dtb_order', 'order_id = ?', array($order_id)));
+    $this->actual['customer'] = array_shift($this->objQuery->select(
+      'point', 'dtb_customer', 'customer_id = ?', '1001'));
+
+    $this->verify();
+  }
+
+  // TODO ロールバックされる場合はexitするためテスト不可.
+  /**
+  public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる() {
+  }
+  */
+
+  //////////////////////////////////////////
+
+  function assertUpdate($new_dates, $old_dates, $key, $message, $is_update = true) {
+    $new_date = $new_dates[0][$key];
+    $old_date = $old_dates[0][$key];
+    if (empty($new_date)) $new_date = '2000-01-01 00:00:00';
+    if (empty($old_date)) $old_date = '2000-01-01 00:00:00';
+
+    if ($is_update) {
+      $this->assertTrue($new_date > $old_date, $message . 'が更新されている');
+    } else {
+      $this->assertEquals($new_date, $old_date, $message . 'が更新されていない');
+    }
+  }
+}
+
+class SC_Helper_Purchase_sfUpdateOrderStatusMock extends SC_Helper_Purchase {
+
+  var $usePoint;
+  var $addPoint;
+
+  function isUsePoint($status) {
+    if (is_null($this->usePoint)) {
+      return parent::isUsePoint($status);
+    }
+    return $this->usePoint;
+  }
+
+  function isAddPoint($status) {
+    if (is_null($this->addPoint)) {
+      return parent::isAddPoint($status);
+    }
+    return $this->addPoint;
+  }
+}
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveOrderTempTest.php	(revision 22278)
@@ -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_saveOrderTempMock();
+  }
+
+  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_saveOrderTempMock extends SC_Helper_Purchase {
+  function copyFromCustomer($sqlval, $objCustomer) {
+    echo('COPY_FROM_CUSTOMER');
+  }
+}
+
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerOrderTest.php	(revision 22278)
@@ -0,0 +1,198 @@
+<?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::registerOrder()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_registerOrderTest extends SC_Helper_Purchase_TestBase {
+
+  private $helper;
+
+  protected function setUp() {
+    parent::setUp();
+    $this->setUpOrder();
+    $this->helper = new SC_Helper_Purchase_registerOrderMock();
+  }
+
+  protected function tearDown() {
+    parent::tearDown();
+  }
+
+  /////////////////////////////////////////
+  public function testRegisterOrder_既に受注IDが存在する場合_情報が更新される() {
+    $order_id = '1001';
+    $arrParams = array(
+      'status' => '1',
+      'add_point' => 10,
+      'use_point' => 20,
+      'order_name01' => '受注情報01_更新'
+    );
+
+    $this->helper->registerOrder($order_id, $arrParams);
+
+    $this->expected = array(
+      'sfUpdateOrderStatus' => array(
+        'order_id' => '1001',
+        'status' => '1',
+        'add_point' => 10,
+        'use_point' => 20
+      ),
+      'sfUpdateOrderNameCol' => '1001',
+      'count' => '2',
+      'content' => array(
+        'order_id' => '1001',
+        'customer_id' => '1001',
+        'status' => '1',
+        'add_point' => '10',
+        'use_point' => '20',
+        'order_name01' => '受注情報01_更新'
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+    $this->actual['count'] = $this->objQuery->count('dtb_order');
+    $result = $this->objQuery->select(
+      'order_id, customer_id, status, order_name01, add_point, use_point',
+      'dtb_order',
+      'order_id = ?',
+      array($order_id)
+    );
+    $this->actual['content'] = $result[0];
+
+    $this->verify();
+  }
+
+  public function testRegisterOrder_存在しない受注IDを指定した場合_新規に登録される() {
+    $order_id = '1003';
+    $arrParams = array(
+      'customer_id' => '1003',
+      'status' => '2',
+      'add_point' => 100,
+      'use_point' => 200,
+      'order_name01' => '受注情報03'
+    );
+
+    $this->helper->registerOrder($order_id, $arrParams);
+
+    $this->expected = array(
+      'sfUpdateOrderStatus' => array(
+        'order_id' => '1003',
+        'status' => '2',
+        'add_point' => 100,
+        'use_point' => 200
+      ),
+      'sfUpdateOrderNameCol' => '1003',
+      'count' => '3',
+      'content' => array(
+        'order_id' => '1003',
+        'customer_id' => '1003',
+        'status' => null,         // ここではsfUpdateOrderStatusをモックにしているので更新されない
+        'add_point' => '100',
+        'use_point' => '200',
+        'order_name01' => '受注情報03'
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+    $this->actual['count'] = $this->objQuery->count('dtb_order');
+    $result = $this->objQuery->select(
+      'order_id, customer_id, status, order_name01, add_point, use_point',
+      'dtb_order',
+      'order_id = ?',
+      array($order_id)
+    );
+    $this->actual['content'] = $result[0];
+
+    $this->verify();
+  }
+
+  public function testRegisterOrder_受注IDが未指定の場合_新たにIDが発行される() {
+    $order_id = '';
+    $arrParams = array( // 顧客IDも未指定
+      'status' => '2',
+      'add_point' => 100,
+      'use_point' => 200,
+      'order_name01' => '受注情報03'
+    );
+
+    // SEQの値を取得
+    $new_order_id = $this->helper->getNextOrderID() + 1;
+
+    $this->helper->registerOrder($order_id, $arrParams);
+
+    $this->expected = array(
+      'sfUpdateOrderStatus' => array(
+        'order_id' => $new_order_id,
+        'status' => '2',
+        'add_point' => 100,
+        'use_point' => 200
+      ),
+      'sfUpdateOrderNameCol' => $new_order_id,
+      'count' => '3',
+      'content' => array(
+        'order_id' => $new_order_id,
+        'customer_id' => '0',
+        'status' => null,         // ここではsfUpdateOrderStatusをモックにしているので更新されない
+        'add_point' => '100',
+        'use_point' => '200',
+        'order_name01' => '受注情報03'
+      )
+    );
+    $this->actual = $_SESSION['testResult'];
+    $this->actual['count'] = $this->objQuery->count('dtb_order');
+    $result = $this->objQuery->select(
+      'order_id, customer_id, status, order_name01, add_point, use_point',
+      'dtb_order',
+      'order_id = ?',
+      array($new_order_id)
+    );
+    $this->actual['content'] = $result[0];
+
+    $this->verify();
+
+  }
+
+  //////////////////////////////////////////
+
+}
+
+class SC_Helper_Purchase_registerOrderMock extends SC_Helper_Purchase {
+  function sfUpdateOrderStatus($order_id, $status, $add_point, $use_point, $values) {
+    $_SESSION['testResult']['sfUpdateOrderStatus'] = array(
+      'order_id' => $order_id,
+      'status' => $status,
+      'add_point' => $add_point,
+      'use_point' => $use_point,
+    );
+  }
+
+  function sfUpdateOrderNameCol($order_id) {
+   $_SESSION['testResult']['sfUpdateOrderNameCol'] = $order_id;
+  }
+}
+
Index: /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php	(revision 22278)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_cleanupSessionTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php	(revision 22278)
@@ -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-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php	(revision 22278)
@@ -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',
@@ -74,10 +74,12 @@
          'payment_date' => '2032-12-31 01:20:30',
          'enable' => '0',
-         'effective' => '1'
+         'effective' => '1',
+         'tax_rate' => '5',
+         'tax_rule' => '0'
        ),
        array(
          'product_id' => '1001',
          'product_class_id' => '1001',
-         'product_type_id' => '1001',
+         'product_type_id' => '1',
          'product_code' => 'pc1001',
          'product_name' => '製品名1001',
@@ -90,5 +92,7 @@
          'payment_date' => '2032-12-31 01:20:30',
          'enable' => '1',
-         'effective' => '1'
+         'effective' => '1',
+         'tax_rate' => '3',
+         'tax_rule' => '1'
        )
     );
@@ -105,5 +109,5 @@
          'product_id' => '1002',
          'product_class_id' => '1002',
-         'product_type_id' => '1002',
+         'product_type_id' => '2',
          'product_code' => 'pc1002',
          'product_name' => '製品名1002',
@@ -116,10 +120,12 @@
          // 'payment_date' => '2032-12-31 01:20:30',
          'enable' => '0',
-         'effective' => '1'
+         'effective' => '1',
+         'tax_rate' => '5',
+         'tax_rule' => '0'
        ),
        array(
          'product_id' => '1001',
          'product_class_id' => '1001',
-         'product_type_id' => '1001',
+         'product_type_id' => '1',
          'product_code' => 'pc1001',
          'product_name' => '製品名1001',
@@ -132,5 +138,7 @@
          // 'payment_date' => '2032-12-31 01:20:30',
          'enable' => '1',
-         'effective' => '1'
+         'effective' => '1',
+         'tax_rate' => '3',
+         'tax_rule' => '1'
        )
     );
Index: /branches/version-2_12-multilang/tests/class/test/util/User_Utils.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/test/util/User_Utils.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/test/util/User_Utils.php	(revision 22278)
@@ -29,9 +29,8 @@
       return;
     }
-    if ($customer == null) {
-      $customer = self::getDefaultCustomer();
-    }
+    $customer = array_merge(self::getDefaultCustomer(), $customer);
     $_SESSION['customer']['customer_id'] = $customer['customer_id'];
     $_SESSION['customer']['email'] = $customer['email'];
+    $objQuery->delete('dtb_customer', 'customer_id = ?', array($customer['customer_id']));
     $objQuery->insert('dtb_customer', $customer);
   }
Index: /branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php
===================================================================
--- /branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php	(revision 22144)
+++ /branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php	(revision 22278)
@@ -49,4 +49,35 @@
   }
 
+  /**
+   * 配列の各要素（連想配列）から特定のキーだけを抜き出した配列を返します.
+   * 入力の連想配列には変更を加えません.
+   * 
+   * @static
+   * @param input_array 入力の配列
+   * @param key 抽出対象のキー
+   * @return 指定のキーだけを抜き出した配列
+   */
+  public static function mapCols($input_array, $key) {
+    $output_array = array();
+    foreach ($input_array as $data) {
+      $output_array[] = $data[$key];
+    }
+    
+    return $output_array;
+  }
+
+  /**
+   * 配列に別の配列をappendします。
+   * $orig_arrayが直接変更されます。
+   * 
+   * @static
+   * @param orig_array 追加先の配列
+   * @param new_array 追加要素を持つ配列
+   */
+  public static function array_append(&$orig_array, $new_array) {
+    foreach ($new_array as $element) {
+      $orig_array[] = $element;
+    }
+  }
 }
 
Index: /branches/version-2_12-multilang/html/install/index.php
===================================================================
--- /branches/version-2_12-multilang/html/install/index.php	(revision 22240)
+++ /branches/version-2_12-multilang/html/install/index.php	(revision 22278)
@@ -198,5 +198,5 @@
 
         //マスターデータのキャッシュを削除
-        $cache_dir = '../../data/cache/';
+        $cache_dir = DATA_REALDIR . 'cache/';
         $res_dir = opendir($cache_dir);
         while ($file_name = readdir($res_dir)){
Index: /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 22100)
+++ /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 22278)
@@ -584,5 +584,5 @@
 
         // 在庫無制限フラグ列を利用する場合、
-        if (array_key_exists('stock_unlimited', $sqlval)) {
+        if (array_key_exists('stock_unlimited', $sqlval) and $sqlval['stock_unlimited'] != '') {
             // 在庫無制限フラグ = 無制限の場合、
             if ($sqlval['stock_unlimited'] == UNLIMITED_FLG_UNLIMITED) {
Index: /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php	(revision 22100)
+++ /branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php	(revision 22278)
@@ -88,5 +88,5 @@
                 $this->arrErr = $objFormParam->checkError();
                 // エラー無し
-                if (!SC_Utils_Ex::isBlank($this->arrErr)) {
+                if (SC_Utils_Ex::isBlank($this->arrErr)) {
                     // レビュー情報の更新
                     $this->lfRegistReviewData($this->arrForm['review_id'], $objFormParam);
Index: /branches/version-2_12-multilang/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
===================================================================
--- /branches/version-2_12-multilang/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php	(revision 22122)
+++ /branches/version-2_12-multilang/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php	(revision 22278)
@@ -221,11 +221,21 @@
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
-        if (!SC_Utils_Ex::sfIsInt($objFormParam->getValue('template_id'))) {
-            trigger_error('テンプレートが指定されていません。', E_USER_ERROR);
-        }
-
-        $where = 'template_id = ?';
-        $arrWhereVal = array($objFormParam->getValue('template_id'));
-        $mailTemplates = $objQuery->getRow('subject, header, footer', 'dtb_mailtemplate', $where, $arrWhereVal);
+        $template_id = $objFormParam->getValue('template_id');
+
+        // 未選択時
+        if (strlen($template_id) === 0) {
+            $mailTemplates = null;
+        }
+        // 有効選択時
+        elseif (SC_Utils_Ex::sfIsInt($template_id)) {
+            $where = 'template_id = ?';
+            $arrWhereVal = array($template_id);
+            $mailTemplates = $objQuery->getRow('subject, header, footer', 'dtb_mailtemplate', $where, $arrWhereVal);
+        }
+        // 不正選択時
+        else {
+            trigger_error('テンプレートの指定が不正。', E_USER_ERROR);
+        }
+
         if (empty($mailTemplates)) {
             foreach (array('subject','header','footer') as $key) {
Index: /branches/version-2_12-multilang/data/Smarty/templates/default/contact/confirm.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/default/contact/confirm.tpl	(revision 22205)
+++ /branches/version-2_12-multilang/data/Smarty/templates/default/contact/confirm.tpl	(revision 22278)
@@ -38,9 +38,9 @@
             <col width="70%" />
             <tr>
-                <th>お名前<span class="attention">※</span></th>
+                <th>お名前</th>
                 <td><!--{$arrForm.name01.value|h}-->　<!--{$arrForm.name02.value|h}--></td>
             </tr>
             <tr>
-                <th>お名前(フリガナ)<span class="attention">※</span></th>
+                <th>お名前(フリガナ)</th>
                 <td><!--{$arrForm.kana01.value|h}-->　<!--{$arrForm.kana02.value|h}--></td>
             </tr>
@@ -71,9 +71,9 @@
             </tr>
             <tr>
-                <th>メールアドレス<span class="attention">※</span></th>
+                <th>メールアドレス</th>
                 <td><a href="mailto:<!--{$arrForm.email.value|escape:'hex'}-->"><!--{$arrForm.email.value|escape:'hexentity'}--></a></td>
             </tr>
             <tr>
-                <th>お問い合わせ内容<span class="attention">※</span></th>
+                <th>お問い合わせ内容</th>
                 <td><!--{$arrForm.contents.value|h|nl2br}--></td>
             </tr>
Index: /branches/version-2_12-multilang/data/Smarty/templates/default/products/review_confirm.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/default/products/review_confirm.tpl	(revision 21867)
+++ /branches/version-2_12-multilang/data/Smarty/templates/default/products/review_confirm.tpl	(revision 22278)
@@ -42,5 +42,5 @@
         </tr>
         <tr>
-            <th>投稿者名<span class="attention">※</span></th>
+            <th>投稿者名</th>
             <td><!--{$arrForm.reviewer_name|h}--></td>
         </tr>
@@ -54,13 +54,13 @@
         </tr>
         <tr>
-            <th>おすすめレベル<span class="attention">※</span></th>
+            <th>おすすめレベル</th>
             <td><span class="recommend_level"><!--{$arrRECOMMEND[$arrForm.recommend_level]}--></span></td>
         </tr>
         <tr>
-            <th>タイトル<span class="attention">※</span></th>
+            <th>タイトル</th>
             <td><!--{$arrForm.title|h}--></td>
         </tr>
         <tr>
-            <th>コメント<span class="attention">※</span></th>
+            <th>コメント</th>
             <td><!--{$arrForm.comment|h|nl2br}--></td>
         </tr>
Index: /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/contact/confirm.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/contact/confirm.tpl	(revision 22262)
+++ /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/contact/confirm.tpl	(revision 22278)
@@ -38,5 +38,5 @@
             <col width="70%" />
             <tr>
-                <th>First Name<span class="attention">*</span></th>
+                <th>First Name</th>
                 <td><!--{$arrForm.name01.value|h}--> <!--{$arrForm.name02.value|h}--></td>
             </tr>
@@ -67,9 +67,9 @@
             </tr>
             <tr>
-                <th>E-mail address<span class="attention">*</span></th>
+                <th>E-mail address</th>
                 <td><a href="mailto:<!--{$arrForm.email.value|escape:'hex'}-->"><!--{$arrForm.email.value|escape:'hexentity'}--></a></td>
             </tr>
             <tr>
-                <th>Details of inquiry<span class="attention">*</span></th>
+                <th>Details of inquiry</th>
                 <td><!--{$arrForm.contents.value|h|nl2br}--></td>
             </tr>
Index: /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/products/review_confirm.tpl
===================================================================
--- /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/products/review_confirm.tpl	(revision 22262)
+++ /branches/version-2_12-multilang/data/Smarty/templates/default_en-US/products/review_confirm.tpl	(revision 22278)
@@ -42,5 +42,5 @@
         </tr>
         <tr>
-            <th>Poster name<span class="attention">*</span></th>
+            <th>Poster name</th>
             <td><!--{$arrForm.reviewer_name|h}--></td>
         </tr>
@@ -54,13 +54,13 @@
         </tr>
         <tr>
-            <th>Recommendation level<span class="attention">*</span></th>
+            <th>Recommendation level</th>
             <td><span class="recommend_level"><!--{$arrRECOMMEND[$arrForm.recommend_level]}--></span></td>
         </tr>
         <tr>
-            <th>Title<span class="attention">*</span></th>
+            <th>Title</th>
             <td><!--{$arrForm.title|h}--></td>
         </tr>
         <tr>
-            <th>Comment<span class="attention">*</span></th>
+            <th>Comment</th>
             <td><!--{$arrForm.comment|h|nl2br}--></td>
         </tr>
