From dfe01a7b10a8c2d33cbba15986fd6733e51f9f32 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 17 Dec 2024 18:02:38 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3=E3=83=88?= =?UTF-8?q?=E7=AD=89=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/class/api/SC_Api_Operation.php | 18 ++--- data/class/api/SC_Api_Utils.php | 2 +- .../LC_Page_Admin_Contents_CsvSql.php | 2 +- .../ownersstore/LC_Page_Admin_OwnersStore.php | 2 +- ..._Page_Admin_Products_UploadCSVCategory.php | 7 +- .../system/LC_Page_Admin_System_Editdb.php | 6 +- .../system/LC_Page_Admin_System_Parameter.php | 8 ++- data/class/pages/api/LC_Page_Api.php | 2 +- data/class/pages/api/LC_Page_Api_Json.php | 2 +- data/class/pages/api/LC_Page_Api_Php.php | 2 +- data/class/pages/api/LC_Page_Api_Xml.php | 2 +- data/class/pages/forgot/LC_Page_Forgot.php | 6 +- .../mypage/LC_Page_Mypage_DeliveryAddr.php | 6 +- data/module/Calendar/Decorator.php | 4 +- data/module/Calendar/Table/Helper.php | 6 +- .../SC_CheckError_createParamTest.php | 6 +- .../SC_Date/SC_Date_getZeroMonthTest.php | 3 +- tests/class/SC_Query_Test.php | 18 +++-- ...C_Helper_Purchase_getShipmentItemsTest.php | 20 ++++-- ...SC_Helper_Purchase_getShippingTempTest.php | 6 +- .../SC_Helper_Purchase_getShippingsTest.php | 6 +- ...C_Helper_Purchase_registerShippingTest.php | 4 +- ...elper_Purchase_sfUpdateOrderStatusTest.php | 20 +++--- .../SC_Utils/SC_Utils_isAppInnerUrlTest.php | 72 +++++++++---------- .../SC_Utils/SC_Utils_sfGetAddressTest.php | 39 +++++----- ...tils_sfGetHashString_authTypePlainTest.php | 21 +++--- .../util/SC_Utils/SC_Utils_sfIsIntTest.php | 17 +++-- ...fIsMatchHashPassword_authTypePlainTest.php | 46 ++++++------ .../util/SC_Utils/SC_Utils_sfPrintRTest.php | 23 +++--- 29 files changed, 201 insertions(+), 175 deletions(-) diff --git a/data/class/api/SC_Api_Operation.php b/data/class/api/SC_Api_Operation.php index 3fd75fda97..5515ddecb8 100644 --- a/data/class/api/SC_Api_Operation.php +++ b/data/class/api/SC_Api_Operation.php @@ -367,10 +367,11 @@ public static function doApiAction($arrPost) if (count($arrErr) == 0) { // 実行成功 - $arrResponseValidSection = ['Request' => [ - 'IsValid' => 'True', - $operation_name.'Request' => $arrOperationRequestValid, - ], + $arrResponseValidSection = [ + 'Request' => [ + 'IsValid' => 'True', + $operation_name.'Request' => $arrOperationRequestValid, + ], ]; $response_outer = $operation_name.'Response'; SC_Api_Utils_Ex::printApiLog('Operation SUCCESS', $start_time, $response_outer); @@ -380,10 +381,11 @@ public static function doApiAction($arrPost) foreach ($arrErr as $error_code => $error_msg) { $arrResponseErrorSection[] = ['Code' => $error_code, 'Message' => $error_msg]; } - $arrResponseValidSection = ['Request' => [ - 'IsValid' => 'False', - 'Errors' => ['Error' => $arrResponseErrorSection], - ], + $arrResponseValidSection = [ + 'Request' => [ + 'IsValid' => 'False', + 'Errors' => ['Error' => $arrResponseErrorSection], + ], ]; if (is_object($objApiOperation)) { $response_outer = $operation_name.'Response'; diff --git a/data/class/api/SC_Api_Utils.php b/data/class/api/SC_Api_Utils.php index 0321516089..826ddea0ef 100644 --- a/data/class/api/SC_Api_Utils.php +++ b/data/class/api/SC_Api_Utils.php @@ -114,7 +114,7 @@ public static function getApiConfig($operation_name) * @param string $msg 出力文字列 * @param text $operation_name * - * @ @rturn void + * @return void */ public static function printApiLog($msg, $start_time = '', $operation_name = '') { diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php b/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php index 80a1c598b0..69c846a81c 100644 --- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php +++ b/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php @@ -461,7 +461,7 @@ public function lfGetSqlDenyList() 'NOTIFY\s', 'PREPARE\s', 'REASSIGN\s', - // 'REINDEX\s', // REINDEXは許可で良いかなと + // 'REINDEX\s', // REINDEXは許可で良いかなと 'RELEASE\sSAVEPOINT', 'RENAME\s', 'REST\s', diff --git a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php b/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php index c6cc2a9a93..7081f41626 100644 --- a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php +++ b/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php @@ -1113,7 +1113,7 @@ public function checkConflictPlugin($plugin_id) /** * エラー情報が格納されているか判定します. * - * @return bool. + * @return bool */ public function isError($error) { diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php b/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php index 49cd505a36..716062134f 100644 --- a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php +++ b/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php @@ -500,9 +500,12 @@ public function lfCheckErrorDetail($item, $arrErr) $where = 'parent_category_id = ? AND category_id <> ? AND category_name = ?'; $exists = $objQuery->exists('dtb_category', $where, - [$parent_category_id, + [ + $parent_category_id, $item['category_id'], - $item['category_name'], ]); + $item['category_name'], + ] + ); if ($exists) { $arrErr['category_name'] = '※ 既に同名のカテゴリが存在します。'; } diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php b/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php index 0ba97814c2..50de0ba67b 100644 --- a/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php +++ b/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php @@ -148,10 +148,12 @@ public function lfGetTargetData(&$objFormParam) // 変更されている対象を走査 for ($i = 1; $i <= count($arrIndexFlag); $i++) { // 入力値チェック - $param = ['indexflag' => $arrIndexFlag[$i], + $param = [ + 'indexflag' => $arrIndexFlag[$i], 'indexflag_new' => $arrIndexFlagNew[$i], 'table_name' => $arrTableName[$i], - 'column_name' => $arrColumnName[$i], ]; + 'column_name' => $arrColumnName[$i], + ]; $objErr = new SC_CheckError_Ex($param); $objErr->doFunc(['インデックス('.$i.')', 'indexflag', INT_LEN], ['NUM_CHECK']); $objErr->doFunc(['インデックス変更後('.$i.')', 'indexflag_new', INT_LEN], ['NUM_CHECK']); diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php b/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php index b0df7961b2..ccfcfce7e4 100644 --- a/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php +++ b/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php @@ -139,8 +139,12 @@ public function errorCheck(&$arrKeys, &$arrForm) { $objErr = new SC_CheckError_Ex($arrForm); for ($i = 0; $i < count($arrKeys); $i++) { - $objErr->doFunc([$arrKeys[$i], - $arrForm[$arrKeys[$i]], ], + $objErr->doFunc( + [ + $arrKeys[$i], + $arrForm[$arrKeys[$i] + ], + ], ['EXIST_CHECK_REVERSE', 'EVAL_CHECK']); } diff --git a/data/class/pages/api/LC_Page_Api.php b/data/class/pages/api/LC_Page_Api.php index c7fdf4a58a..1ab54add7f 100644 --- a/data/class/pages/api/LC_Page_Api.php +++ b/data/class/pages/api/LC_Page_Api.php @@ -48,7 +48,7 @@ public function init() public function process() { $this->action(); - // $this->sendResponse(); + // $this->sendResponse(); } /** diff --git a/data/class/pages/api/LC_Page_Api_Json.php b/data/class/pages/api/LC_Page_Api_Json.php index ed285ec988..f77215a921 100644 --- a/data/class/pages/api/LC_Page_Api_Json.php +++ b/data/class/pages/api/LC_Page_Api_Json.php @@ -48,7 +48,7 @@ public function init() public function process() { $this->action(); - // $this->sendResponse(); + // $this->sendResponse(); } /** diff --git a/data/class/pages/api/LC_Page_Api_Php.php b/data/class/pages/api/LC_Page_Api_Php.php index b260a7bd57..0bff94c58c 100644 --- a/data/class/pages/api/LC_Page_Api_Php.php +++ b/data/class/pages/api/LC_Page_Api_Php.php @@ -48,7 +48,7 @@ public function init() public function process() { $this->action(); - // $this->sendResponse(); + // $this->sendResponse(); } /** diff --git a/data/class/pages/api/LC_Page_Api_Xml.php b/data/class/pages/api/LC_Page_Api_Xml.php index 0b991c0434..fa5f52f76d 100644 --- a/data/class/pages/api/LC_Page_Api_Xml.php +++ b/data/class/pages/api/LC_Page_Api_Xml.php @@ -48,7 +48,7 @@ public function init() public function process() { $this->action(); - // $this->sendResponse(); + // $this->sendResponse(); } /** diff --git a/data/class/pages/forgot/LC_Page_Forgot.php b/data/class/pages/forgot/LC_Page_Forgot.php index 5623638583..c1e38f9044 100644 --- a/data/class/pages/forgot/LC_Page_Forgot.php +++ b/data/class/pages/forgot/LC_Page_Forgot.php @@ -202,8 +202,10 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder) $where = '(email = ? OR email_mobile = ?)' .' AND name01 = ? AND name02 = ?' .' AND status = 2 AND del_flg = 0'; - $arrVal = [$arrForm['email'], $arrForm['email'], - $arrForm['name01'], $arrForm['name02'], ]; + $arrVal = [ + $arrForm['email'], $arrForm['email'], + $arrForm['name01'], $arrForm['name02'], + ]; $result = $objQuery->select($cols, $table, $where, $arrVal); if (isset($result[0]['reminder']) && isset($arrReminder[$result[0]['reminder']]) && $result[0]['reminder'] == $arrForm['reminder']) { diff --git a/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php b/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php index 657de4993d..24a7a3dc6f 100644 --- a/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php +++ b/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php @@ -49,9 +49,11 @@ public function init() $this->arrPref = $masterData->getMasterData('mtb_pref'); $this->arrCountry = $masterData->getMasterData('mtb_country'); $this->httpCacheControl('nocache'); - $this->validUrl = [MYPAGE_DELIVADDR_URLPATH, + $this->validUrl = [ + MYPAGE_DELIVADDR_URLPATH, DELIV_URLPATH, - MULTIPLE_URLPATH, ]; + MULTIPLE_URLPATH, + ]; } /** diff --git a/data/module/Calendar/Decorator.php b/data/module/Calendar/Decorator.php index 1ba3939e9c..31eda6872b 100644 --- a/data/module/Calendar/Decorator.php +++ b/data/module/Calendar/Decorator.php @@ -32,8 +32,8 @@ * { * function thisDay($format = 'int') * { - * .* $day = parent::thisDay('timestamp'); - * .* return date('D', $day); + * $day = parent::thisDay('timestamp'); + * return date('D', $day); * } * } * $Day = & new Calendar_Day(2003, 10, 25); diff --git a/data/module/Calendar/Table/Helper.php b/data/module/Calendar/Table/Helper.php index 86174dee5e..1249ae4326 100644 --- a/data/module/Calendar/Table/Helper.php +++ b/data/module/Calendar/Table/Helper.php @@ -232,12 +232,12 @@ public function getEmptyDaysBefore() public function getEmptyDaysAfter() { // Causes bug when displaying more than one month - // static $index; - // if (!isset($index)) { + // static $index; + // if (!isset($index)) { $index = $this->getEmptyDaysBefore() + $this->cE->getDaysInMonth( $this->calendar->thisYear(), $this->calendar->thisMonth()); - // } + // } return $index; } diff --git a/tests/class/SC_CheckError/SC_CheckError_createParamTest.php b/tests/class/SC_CheckError/SC_CheckError_createParamTest.php index 75898cfca0..80dc78730a 100644 --- a/tests/class/SC_CheckError/SC_CheckError_createParamTest.php +++ b/tests/class/SC_CheckError/SC_CheckError_createParamTest.php @@ -47,8 +47,10 @@ public function testArrParamIsCaracter() { $this->objErr->doFunc(['EXIST_CHECK', 'aabbcc_1234'], ['EXIST_CHECK']); - $this->expected = [self::FORM_NAME => [0 => 'A', 1 => 'B', 2 => 'C'], - 'aabbcc_1234' => '', ]; + $this->expected = [ + self::FORM_NAME => [0 => 'A', 1 => 'B', 2 => 'C'], + 'aabbcc_1234' => '', + ]; $this->actual = $this->objErr->arrParam; $this->assertEquals($this->expected, $this->actual); } diff --git a/tests/class/SC_Date/SC_Date_getZeroMonthTest.php b/tests/class/SC_Date/SC_Date_getZeroMonthTest.php index 5f496c8a50..8c4416c368 100644 --- a/tests/class/SC_Date/SC_Date_getZeroMonthTest.php +++ b/tests/class/SC_Date/SC_Date_getZeroMonthTest.php @@ -49,7 +49,8 @@ public function testGetZeroMonth要素の数が12の配列を返す() public function testGetZeroMonth0をつけた月の配列を返す() { - $this->expected = ['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->expected = [ + '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(); diff --git a/tests/class/SC_Query_Test.php b/tests/class/SC_Query_Test.php index ebc728ae49..7977f62a3b 100644 --- a/tests/class/SC_Query_Test.php +++ b/tests/class/SC_Query_Test.php @@ -248,15 +248,21 @@ public function testUpdate() $this->setTestData(1, '2', 'f'); $this->objQuery->update('test_table', - ['id' => '1', + [ + 'id' => '1', 'column1' => '2', 'column2' => '2', - 'column3' => 'f', ], + 'column3' => 'f', + ], 'id = ?', [1]); - $this->expected = [['id' => '1', - 'column1' => '2', - 'column2' => '2', - 'column3' => 'f', ]]; + $this->expected = [ + [ + 'id' => '1', + 'column1' => '2', + 'column2' => '2', + 'column3' => 'f', + ], + ]; $this->actual = $this->objQuery->getAll('SELECT * FROM test_table'); diff --git a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php index 6712111536..91413e8046 100644 --- a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php +++ b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php @@ -100,11 +100,17 @@ public function testGetShipmentItems存在する受注IDと配送先IDを指定 $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id); $this->actual['count'] = count($result); - $this->actual['first'] = Test_Utils::mapArray($result[0], [ - 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]); + $this->actual['first'] = Test_Utils::mapArray($result[0], + [ + 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', + ] + ); $this->actual['first']['productsClass'] = Test_Utils::mapArray($this->actual['first']['productsClass'], ['product_class_id', 'product_id']); - $this->actual['second'] = Test_Utils::mapArray($result[1], [ - 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]); + $this->actual['second'] = Test_Utils::mapArray($result[1], + [ + 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', + ] + ); $this->actual['second']['productsClass'] = Test_Utils::mapArray($this->actual['second']['productsClass'], ['product_class_id', 'product_id']); $this->verify('配送情報'); } @@ -135,9 +141,11 @@ public function testGetShipmentItems詳細フラグをOFFにした場合結果 $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id, false); $this->actual['count'] = count($result); $this->actual['first'] = Test_Utils::mapArray($result[0], [ - 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]); + 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', + ]); $this->actual['second'] = Test_Utils::mapArray($result[1], [ - 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', ]); + 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass', + ]); $this->verify('配送情報'); } diff --git a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php index 2897f9fcdc..b1099094ce 100644 --- a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php +++ b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php @@ -62,11 +62,13 @@ public function testGetShippingTemp保有フラグがONの場合商品のある '00001' => [ 'shipment_id' => '00001', 'shipment_item' => ['商品1'], - 'shipping_pref' => '東京都', ], + 'shipping_pref' => '東京都', + ], '00002' => [ 'shipment_id' => '00002', 'shipment_item' => ['商品2'], - 'shipping_pref' => '沖縄県', ], + 'shipping_pref' => '沖縄県', + ], ]; $this->actual = SC_Helper_Purchase::getShippingTemp(true); diff --git a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php index 857513b7a9..7261d688d0 100644 --- a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php +++ b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php @@ -81,7 +81,8 @@ public function testGetShippings存在する受注IDを指定した場合結果 $this->actual['count'] = count($result); // shipping_idごとの配列になっているのでshipping_idで抽出 $this->actual['first'] = Test_Utils::mapArray($result[0], [ - 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', ]); + 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', + ]); $this->actual['shipment_item_count'] = count($result[0]['shipment_item']); $this->verify('配送情報'); } @@ -105,7 +106,8 @@ public function testGetShippings商品取得フラグをOFFにした場合結果 $this->actual['count'] = count($result); // shipping_idごとの配列になっているのでshipping_idで抽出 $this->actual['first'] = Test_Utils::mapArray($result[0], [ - 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', ]); + 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date', + ]); $this->actual['shipment_item_count'] = is_array($result['1']['shipment_item']) ? count($result['1']['shipment_item']) : 0; $this->verify('配送情報'); } diff --git a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php index af3a1549bd..4c53264dc1 100644 --- a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php +++ b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php @@ -127,7 +127,7 @@ public function testRegisterShipping配送日付が空の場合エラーが起 'order_id' => '2', 'shipping_id' => '30', 'shipping_name01' => '配送情報02-update', - // 'shipping_date' => '2013/12/03 00:00:00' + // 'shipping_date' => '2013/12/03 00:00:00' ], ]; @@ -162,7 +162,7 @@ public function testRegisterShipping非会員購入の場合配送IDが設定さ $arrParams = [ '30' => [ 'order_id' => '2', - // 'shipping_id' => '30', + // 'shipping_id' => '30', 'shipping_name01' => '配送情報02-update', 'shipping_date' => '2013/12/03 00:00:00', ], diff --git a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php index 8279140c1f..4942a3a1c8 100644 --- a/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php +++ b/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_sfUpdateOrderStatusTest.php @@ -87,13 +87,11 @@ public function testSfUpdateOrderStatusオプションの引数が未指定の } // TODO 定数を変更できないためテスト不可 - /** - * public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない() - * { - * - * $this->verify(); - * } - */ + // public function testSfUpdateOrderStatus_ポイント使用しない設定の場合_ポイントに関する処理が行われない() + // { + // $this->verify(); + // } + public function testSfUpdateOrderStatus対応状況が発送済みに変更された場合発送日が更新される() { $order_id = $this->order_ids[0]; @@ -345,11 +343,9 @@ public function testSfUpdateOrderStatus加算ポイントが負でポイント } // TODO ロールバックされる場合はexitするためテスト不可. - /** - * public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる() - * { - * } - */ + // public function testSfUpdateOrderStatus_加算ポイントが負でポイントが足りていない場合_会員テーブルがロールバックされエラーとなる() + // { + // } // //////////////////////////////////////// diff --git a/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php b/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php index 73835cf948..edcb14a868 100644 --- a/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php @@ -48,43 +48,41 @@ protected function tearDown(): void } // /////////////////////////////////////// - /** - * public function testIsAppInnerUrl_非SSLかつアプリ内URLの場合_trueが返る() - * { - * $input = 'http://sample.eccube.jp/admin/'; - * $this->expected = true; - * $this->actual = SC_Utils::isAppInnerUrl($input); - * - * $this->verify(); - * } - * - * public function testIsAppInnerUrl_非SSLかつアプリ外URLの場合_falseが返る() - * { - * $input = 'http://outside.eccube.jp/admin/'; - * $this->expected = false; - * $this->actual = SC_Utils::isAppInnerUrl($input); - * - * $this->verify(); - * } - * - * public function testIsAppInnerUrl_SSLかつアプリ内URLの場合_trueが返る() - * { - * $input = 'https://sample.eccube.jp/admin/'; - * $this->expected = true; - * $this->actual = SC_Utils::isAppInnerUrl($input); - * - * $this->verify(); - * } - * - * public function testIsAppInnerUrl_SSLかつアプリ外URLの場合_falseが返る() - * { - * $input = 'https://outside.eccube.jp/admin/'; - * $this->expected = false; - * $this->actual = SC_Utils::isAppInnerUrl($input); - * - * $this->verify(); - * } - */ + // public function testIsAppInnerUrl_非SSLかつアプリ内URLの場合_trueが返る() + // { + // $input = 'http://sample.eccube.jp/admin/'; + // $this->expected = true; + // $this->actual = SC_Utils::isAppInnerUrl($input); + + // $this->verify(); + // } + + // public function testIsAppInnerUrl_非SSLかつアプリ外URLの場合_falseが返る() + // { + // $input = 'http://outside.eccube.jp/admin/'; + // $this->expected = false; + // $this->actual = SC_Utils::isAppInnerUrl($input); + + // $this->verify(); + // } + + // public function testIsAppInnerUrl_SSLかつアプリ内URLの場合_trueが返る() + // { + // $input = 'https://sample.eccube.jp/admin/'; + // $this->expected = true; + // $this->actual = SC_Utils::isAppInnerUrl($input); + + // $this->verify(); + // } + + // public function testIsAppInnerUrl_SSLかつアプリ外URLの場合_falseが返る() + // { + // $input = 'https://outside.eccube.jp/admin/'; + // $this->expected = false; + // $this->actual = SC_Utils::isAppInnerUrl($input); + + // $this->verify(); + // } // //////////////////////////////////////// public function testDummyTest() diff --git a/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php b/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php index 6f46eabfa5..7a5aaadf94 100644 --- a/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_sfGetAddressTest.php @@ -72,26 +72,25 @@ public function test住所が一件だけヒットする場合住所データが // 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' => '5', // 秋田県 + // 'city' => '秋田市', + // 'town' => '' + // ), + // array( + // 'state' => '5', + // 'city' => '秋田市', + // 'town' => '' + // ) + // ); + // $this->actual = SC_Utils::sfGetAddress('0110951'); + // + // $this->verify('郵便番号検索結果'); + // } + public function test住所に但し書きが含まれる場合但し書きが消去される() { $this->expected = [ diff --git a/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php b/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php index fb3aabc6ad..8ee6559ec5 100644 --- a/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php @@ -47,17 +47,16 @@ protected function tearDown(): void } // /////////////////////////////////////// - /** - * public function testSfGetHashString_暗号化なしの設定になっている場合_文字列が変換されない() - * { - * $input = 'hello, world'; - * - * $this->expected = $input; - * $this->actual = SC_Utils::sfGetHashString($input); - * - * $this->verify(); - * } - */ + // public function testSfGetHashString_暗号化なしの設定になっている場合_文字列が変換されない() + // { + // $input = 'hello, world'; + + // $this->expected = $input; + // $this->actual = SC_Utils::sfGetHashString($input); + + // $this->verify(); + // } + public function testDummyTest() { // Warning が出るため空のテストを作成 diff --git a/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php b/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php index 00cd5fc854..c72bc4f9f8 100644 --- a/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php @@ -93,15 +93,14 @@ public function testSfIsInt正の整数の場合TRUEが返る() } // TODO 「整数かどうか」という関数名なのでここはFALSEになるべきでは? - /** - * public function testSfIsInt_正の小数の場合_FALSEが返る() - * { - * $this->expected = FALSE; - * $this->actual = SC_Utils::sfIsInt('123.456'); - * - * $this->verify('整数かどうか'); - * } - */ + // public function testSfIsInt_正の小数の場合_FALSEが返る() + // { + // $this->expected = FALSE; + // $this->actual = SC_Utils::sfIsInt('123.456'); + + // $this->verify('整数かどうか'); + // } + public function testSfIsInt負の整数の場合TRUEが返る() { $this->expected = true; diff --git a/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php b/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php index de88cd8f91..63d67685c7 100644 --- a/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_sfIsMatchHashPassword_authTypePlainTest.php @@ -47,29 +47,29 @@ protected function tearDown(): void } // /////////////////////////////////////// - /** - * 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('パスワード文字列比較結果'); - * } - */ + + // 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('パスワード文字列比較結果'); + // } + public function testDummyTest() { // Warning が出るため空のテストを作成 diff --git a/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php b/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php index d022dbe8df..4685f59983 100644 --- a/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php +++ b/tests/class/util/SC_Utils/SC_Utils_sfPrintRTest.php @@ -45,18 +45,17 @@ protected function tearDown(): void // /////////////////////////////////////// // TODO 環境により出力形式が異なるため、テスト不可(デバッグ用なので、テストしなくてもよさそう) - /** - * public function testSfPrintR__指定したオブジェクトの情報が出力される() - * { - * $output = '
' . "\n" - * . '**デバッグ中**
' . "\n" - * . '' . "\n" - * . '**デバッグ中**
' . "\n"; - * - * $this->expectOutputString($output); - * SC_Utils::sfPrintR(array('test'=>'TEST')); - * } - */ + // public function testSfPrintR__指定したオブジェクトの情報が出力される() + // { + // $output = '
' . "\n" + // . '**デバッグ中**
' . "\n" + // . '' . "\n" + // . '**デバッグ中**
' . "\n"; + + // $this->expectOutputString($output); + // SC_Utils::sfPrintR(array('test'=>'TEST')); + // } + // //////////////////////////////////////// public function testDummyTest() {