Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php	(revision 22567)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductIdsOrderTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testFindProductIdsOrder_商品ID降順()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         // 商品ID降順で商品IDを取得する
         $this->objQuery->setOrder('product_id DESC');
@@ -39,8 +36,4 @@
     public function testFindProductIdsOrder_商品名昇順()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         // 商品名昇順で商品IDを取得する
         $this->objQuery->setOrder('product_id ASC');
@@ -54,8 +47,4 @@
     public function testFindProductIdsOrder_arrOrderDataの設定による並び順()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         // setProductsOrderを行う
         $this->objProducts->setProductsOrder('product_id');
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_listsTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_listsTest.php	(revision 23521)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_listsTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,7 +25,4 @@
     public function testlists_商品一覧取得()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
         //更新日を取得
         $col = 'update_date';
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php	(revision 23543)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetDetailAndProductsClass_商品規格IDの商品情報と規格情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         //更新日を取得
         $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_setProductStatusTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_setProductStatusTest.php	(revision 22567)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_setProductStatusTest.php	(revision 23555)
@@ -12,4 +12,6 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
+        $this->setUpProductStatus();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +26,4 @@
     public function testSetProductStatus_登録した商品ステータスを返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        $this->setUpProductStatus();
         $_SESSION['member_id'] = 1;
          
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailTest.php	(revision 23526)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetDetail_商品IDの詳細情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         //更新日を取得
         $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductStatusTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductStatusTest.php	(revision 22567)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductStatusTest.php	(revision 23555)
@@ -12,4 +12,6 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
+        $this->setUpProductStatus();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,9 +26,4 @@
     public function testGetProductStatus_商品IDなしは空の配列を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        $this->setUpProductStatus();
-
         $this->expected = array();
         $productIds = null;
@@ -39,9 +36,4 @@
     public function testGetProductStatus_指定した商品IDの商品ステータスを返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        $this->setUpProductStatus();
-
         $this->expected = array('1001' => array('1'));
         $productIds = array('1001');
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php	(revision 23543)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByProductIdsTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetProductsClassByProductIds_商品IDなしは空配列を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array();
         
@@ -39,8 +36,4 @@
     public function testGetProductsClassByProductIds_指定の商品IDの情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array(
             0=> array(
@@ -80,8 +73,4 @@
     public function testGetProductsClassByProductIds_削除商品含む商品情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array(
             0=> array(
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php	(revision 23526)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getListByProductIdsTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetListByProductIds_商品ID指定がない場合は空配列()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array();
 
@@ -37,8 +34,4 @@
     public function testGetListByProductIds_指定の商品IDで情報を取得する()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $arrProductId = array('1001');
         //更新日を取得
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassTest.php	(revision 23543)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetProductsClass_商品規格IDから規格情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array(
                 'product_id' => '1001'
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_TestBase.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_TestBase.php	(revision 23543)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_TestBase.php	(revision 23555)
@@ -67,6 +67,31 @@
             $this->objQuery->insert('dtb_products_class', $item);
         }
+
+        $this->setUpClass();
         $this->setUpClassCategory();
         $this->setUpProducts();
+    }
+
+    /**
+     * DBに規格分類情報を登録します.
+     */
+    protected function setUpClass()
+    {
+        $table = 'dtb_class';
+
+        $data = array(
+            array(
+                'class_id' => 1,
+                'name' => '味',
+                'rank' => 1,
+                'creator_id' => 1,
+                'update_date' => 'CURRENT_TIMESTAMP',
+            ),
+        );
+
+        $this->objQuery->delete($table);
+        foreach ($data as $item) {
+            $this->objQuery->insert($table, $item);
+        }
     }
 
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductCountTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductCountTest.php	(revision 22960)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_findProductCountTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testFindProductCount_全ての商品数を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = 3;
 
@@ -37,8 +34,4 @@
     public function testFindProductCount_検索条件に一致する商品数を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $this->objQuery->setWhere('product_id = ?');
         $arrVal = array(1001);
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php	(revision 23543)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testGetProductsClassByQuery_クエリに該当する商品情報を返す()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-
         $this->expected = array(
             0=> array(
Index: /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_reduceStockTest.php
===================================================================
--- /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_reduceStockTest.php	(revision 22567)
+++ /branches/version-2_13-dev/tests/class/SC_Product/SC_Product_reduceStockTest.php	(revision 23555)
@@ -12,4 +12,5 @@
     {
         parent::setUp();
+        $this->setUpProductClass();
         $this->objProducts = new SC_Product_Ex();
     }
@@ -24,8 +25,4 @@
     public function testReduceStock_減少数０はFalse()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $productClassId = '1001';
         $quantity = '0';
@@ -38,8 +35,4 @@
     public function testReduceStock_減少数1はTrue()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $productClassId = '1001';
         $quantity = '1';
@@ -52,8 +45,4 @@
     public function testReduceStock_在庫数をマイナスにする数はFalse()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $productClassId = '1001';
         $quantity = '100';
@@ -67,8 +56,4 @@
     public function testReduceStock_在庫数無限の場合はTrue()
     {
-        $this->setUpProductClass();
-        $this->setUpProducts();
-        $this->setUpClassCategory();
-        
         $productClassId = '1002';
         $quantity = '100';
