[Svn-src-all:3243] [version-2_12-multilang 22144] #1955 r22123 〜 r22143 間のコミットをmerge
h_yoshimoto
admin @ mail.ec-cube.net
2012年 12月 17日 (月) 14:25:59 JST
Subversion committed to /home/svn/open 22144
http://svn.ec-cube.net/open_trac/changeset/22144
┌────────────────────────────┐
│更新者 : h_yoshimoto │
│更新日時: 2012-12-17 14:25:58 +0900 (月, 17 12月 2012)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#1955 r22123 〜 r22143 間のコミットをmerge
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
_U branches/version-2_12-multilang/
A branches/version-2_12-multilang/build.xml
U branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend.tpl
U branches/version-2_12-multilang/data/Smarty/templates/admin/total/index.tpl
U branches/version-2_12-multilang/data/class/SC_CheckError.php
U branches/version-2_12-multilang/data/class/SC_Customer.php
U branches/version-2_12-multilang/data/class/helper/SC_Helper_HandleError.php
U branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
U branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products.php
U branches/version-2_12-multilang/data/class/pages/admin/total/LC_Page_Admin_Total.php
U branches/version-2_12-multilang/data/class/pages/cart/LC_Page_Cart.php
U branches/version-2_12-multilang/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
U branches/version-2_12-multilang/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
U branches/version-2_12-multilang/data/class/util/SC_Utils.php
U branches/version-2_12-multilang/data/locales/ja.mo
U branches/version-2_12-multilang/data/locales/ja.po
U branches/version-2_12-multilang/eccube_install.sh
A branches/version-2_12-multilang/tests/
D branches/version-2_12-multilang/tests/class/
A branches/version-2_12-multilang/tests/class/
D branches/version-2_12-multilang/tests/class/Common_TestCase.php
A branches/version-2_12-multilang/tests/class/Common_TestCase.php
D branches/version-2_12-multilang/tests/class/helper/
A branches/version-2_12-multilang/tests/class/helper/
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php
D branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php
A branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php
D branches/version-2_12-multilang/tests/class/replace/
A branches/version-2_12-multilang/tests/class/replace/
D branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php
A branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php
D branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php
A branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php
D branches/version-2_12-multilang/tests/class/test/
A branches/version-2_12-multilang/tests/class/test/
D branches/version-2_12-multilang/tests/class/test/util/
A branches/version-2_12-multilang/tests/class/test/util/
D branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php
A branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php
D branches/version-2_12-multilang/tests/class/test/util/User_Utils.php
A branches/version-2_12-multilang/tests/class/test/util/User_Utils.php
D branches/version-2_12-multilang/tests/class/util/
A branches/version-2_12-multilang/tests/class/util/
D branches/version-2_12-multilang/tests/class/util/SC_Utils/
A branches/version-2_12-multilang/tests/class/util/SC_Utils/
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php
D branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php
A branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php
D branches/version-2_12-multilang/tests/phpunit.xml.base
A branches/version-2_12-multilang/tests/phpunit.xml.base
D branches/version-2_12-multilang/tests/phpunit.xml.jenkins
A branches/version-2_12-multilang/tests/phpunit.xml.jenkins
D branches/version-2_12-multilang/tests/require.php.base
A branches/version-2_12-multilang/tests/require.php.base
D branches/version-2_12-multilang/tests/require.php.jenkins
A branches/version-2_12-multilang/tests/require.php.jenkins
D branches/version-2_12-multilang/tests/ruleset.xml
A branches/version-2_12-multilang/tests/ruleset.xml
Property changes on: branches/version-2_12-multilang
___________________________________________________________________
変更: svn:mergeinfo
- /branches/version-2_12-dev:21998-22057,22062-22080,22083-22086,22089-22095,22097-22098,22104-22107
/branches/version-2_12_2:21999-22009
/branches/version-2_4:18516-18517,18519,18522-18525,18527,18531,18541,18555,18560
/branches/version-2_4-dev:18473-18475
+ /branches/version-2_12-dev:21998-22057,22062-22080,22083-22086,22089-22095,22097-22098,22104-22107,22111-22120,22123-22143
/branches/version-2_12_2:21999-22009
/branches/version-2_4:18516-18517,18519,18522-18525,18527,18531,18541,18555,18560
/branches/version-2_4-dev:18473-18475
コピーによる追加: branches/version-2_12-multilang/build.xml (コピー元: リビジョン 22143, branches/version-2_12-dev/build.xml)
===================================================================
--- branches/version-2_12-multilang/build.xml (rev 0)
+++ branches/version-2_12-multilang/build.xml 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="EC-CUBE" basedir="." default="test">
+ <!-- Jenkins上でのみ実行するタスク -->
+ <target name="prepare-jenkins">
+ <copy overwrite="true" file="data/config/config.php.jenkins" tofile="data/config/config.php"/>
+ <copy overwrite="true" file="tests/phpunit.xml.jenkins" tofile="tests/phpunit.xml"/>
+ </target>
+
+ <target name="test">
+ <delete>
+ <fileset dir="data/cache">
+ <include name="*"/>
+ </fileset>
+ </delete>
+ <delete dir="reports" includeemptydirs="true" />
+ <mkdir dir="reports/coverage" />
+ <exec dir="."
+ command="phpunit --log-tap reports/tap.log
+ --log-junit reports/unitreport.xml
+ --coverage-html reports/coverage
+ --coverage-clover reports/coverage/coverage.xml
+ --configuration tests/phpunit.xml
+ tests/" />
+ </target>
+ <target name="checkstyle">
+ <exec command="phpcs --standard=tests/ruleset.xml
+ --report=checkstyle
+ --extensions=php
+ -pv data/
+ --report-file=reports/checkstyle.xml
+ --ignore=data/module,data/Smarty,data/smarty_extends" />
+ </target>
+</project>
変更: branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend.tpl
===================================================================
--- branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend.tpl 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/Smarty/templates/admin/contents/recommend.tpl 2012-12-17 05:25:58 UTC (rev 22144)
@@ -110,8 +110,6 @@
</div>
<div class="table-detail">
<div class="detail-name"><!--{t string="tpl_188"}--> <!--{$arrItems[$smarty.section.cnt.iteration].name|h}--></div>
- <!--{if $arrItems[$smarty.section.cnt.iteration].p_del_flg == '1'}-->
- <div class="attention"><!--{t string="tpl_707" T_FIELD=$arrItems[$smarty.section.cnt.iteration].name|h}--></div>
<!--{/if}-->
<div class="detail-form">
<form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
変更: branches/version-2_12-multilang/data/Smarty/templates/admin/total/index.tpl
===================================================================
--- branches/version-2_12-multilang/data/Smarty/templates/admin/total/index.tpl 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/Smarty/templates/admin/total/index.tpl 2012-12-17 05:25:58 UTC (rev 22144)
@@ -31,7 +31,7 @@
<form name="search_form1" id="search_form1" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="search" />
- <input type="hidden" name="form" value="1" />
+ <input type="hidden" name="search_form" value="1" />
<input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" />
<input type="hidden" name="type" value="<!--{$smarty.post.type|h}-->" />
<!--{if $arrErr.search_startyear_m || $arrErr.search_endyear_m}-->
@@ -54,7 +54,7 @@
<form name="search_form2" id="search_form2" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="search" />
- <input type="hidden" name="form" value="2" />
+ <input type="hidden" name="search_form" value="2" />
<input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" />
<input type="hidden" name="type" value="<!--{$smarty.post.type|h}-->" />
<!--{if $arrErr.search_startyear || $arrErr.search_endyear}-->
@@ -99,7 +99,6 @@
<form name="form1" id="form1" method="post" action="?">
<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
<input type="hidden" name="mode" value="search" />
- <input type="hidden" name="form" value="<!--{$arrForm.form.value|h}-->" />
<input type="hidden" name="type" value="<!--{$arrForm.type.value|h}-->" />
<input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" />
<!--{foreach key=key item=item from=$arrHidden}-->
@@ -117,7 +116,7 @@
<!--{if $install_GD}-->
<div id="graph-image">
<!--{* <img src="<!--{$tpl_image}-->?<!--{$cashtime}-->" alt="グラフ"> *}-->
- <img src="?draw_image=true&type=<!--{$smarty.post.type|h}-->&mode=search&page=<!--{$smarty.post.page|h}-->&search_startyear_m=<!--{$smarty.post.search_startyear_m|h}-->&search_startmonth_m=<!--{$smarty.post.search_startmonth_m|h}-->&search_startyear=<!--{$smarty.post.search_startyear|h}-->&search_startmonth=<!--{$smarty.post.search_startmonth|h}-->&search_startday=<!--{$smarty.post.search_startday|h}-->&search_endyear=<!--{$smarty.post.search_endyear|h}-->&search_endmonth=<!--{$smarty.post.search_endmonth|h}-->&search_endday=<!--{$smarty.post.search_endday|h}-->" alt="グラフ" />
+ <img src="?draw_image=true&type=<!--{$smarty.post.type|h}-->&mode=search&search_form=<!--{$smarty.post.search_form|h}-->&page=<!--{$smarty.post.page|h}-->&search_startyear_m=<!--{$smarty.post.search_startyear_m|h}-->&search_startmonth_m=<!--{$smarty.post.search_startmonth_m|h}-->&search_startyear=<!--{$smarty.post.search_startyear|h}-->&search_startmonth=<!--{$smarty.post.search_startmonth|h}-->&search_startday=<!--{$smarty.post.search_startday|h}-->&search_endyear=<!--{$smarty.post.search_endyear|h}-->&search_endmonth=<!--{$smarty.post.search_endmonth|h}-->&search_endday=<!--{$smarty.post.search_endday|h}-->" alt="グラフ" />
</div>
<!--{/if}-->
<!--{* グラフ表示 *}-->
変更: branches/version-2_12-multilang/data/class/SC_CheckError.php
===================================================================
--- branches/version-2_12-multilang/data/class/SC_CheckError.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/SC_CheckError.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -404,9 +404,9 @@
}
}
+ // すべての項目が入力されていない場合はエラーとする。
$blank = false;
- // すべての項目がブランクでないか、すべての項目が入力されていない場合はエラーとする。
for ($i = 1; $i < $max; $i++) {
if (strlen($this->arrParam[$value[$i]]) <= 0) {
$blank = true;
変更: branches/version-2_12-multilang/data/class/SC_Customer.php
===================================================================
--- branches/version-2_12-multilang/data/class/SC_Customer.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/SC_Customer.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -284,7 +284,7 @@
function doLogin($login_email, $login_pass) {
switch (SC_Display_Ex::detectDevice()) {
case DEVICE_TYPE_MOBILE:
- if (!$this->is->getCustomerDataFromMobilePhoneIdPass($login_pass) &&
+ if (!$this->getCustomerDataFromMobilePhoneIdPass($login_pass) &&
!$this->getCustomerDataFromEmailPass($login_pass, $login_email, true)
) {
return false;
変更: branches/version-2_12-multilang/data/class/helper/SC_Helper_HandleError.php
===================================================================
--- branches/version-2_12-multilang/data/class/helper/SC_Helper_HandleError.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/helper/SC_Helper_HandleError.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -47,7 +47,7 @@
// 開発時は -1 (全て) を推奨
error_reporting(E_ALL & ~E_NOTICE & ~E_USER_NOTICE & ~E_DEPRECATED & ~E_STRICT);
- if (!defined('SAFE') || SAFE !== true || !defined('INSTALL_FUNCTION') || INSTALL_FUNCTION !== true) {
+ if (!(defined('SAFE') && SAFE === true) && !(defined('INSTALL_FUNCTION') && INSTALL_FUNCTION === true)) {
// E_USER_ERROR または警告を捕捉した場合のエラーハンドラ
set_error_handler(array(__CLASS__, 'handle_warning'), E_USER_ERROR | E_WARNING | E_USER_WARNING | E_CORE_WARNING | E_COMPILE_WARNING);
変更: branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -174,7 +174,7 @@
*/
function getRecommendProducts() {
$objQuery = $objQuery =& SC_Query_Ex::getSingletonInstance();
- $col = 'dtb_products.name,dtb_products.main_list_image,dtb_products.del_flg as p_del_flg,dtb_best_products.*';
+ $col = 'dtb_products.name,dtb_products.main_list_image,dtb_best_products.*';
$table = 'dtb_best_products INNER JOIN dtb_products ON dtb_best_products.product_id = dtb_products.product_id';
$where = 'dtb_best_products.del_flg = 0';
$order = 'rank';
変更: branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/admin/products/LC_Page_Admin_Products.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -261,6 +261,7 @@
$objQuery->begin();
$objQuery->update('dtb_products_class', $sqlval, "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
$objQuery->delete('dtb_customer_favorite_products', "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
+ $objQuery->delete('dtb_best_products', "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
$objQuery->update('dtb_products', $sqlval, $where, $arrParam);
$objQuery->commit();
}
変更: branches/version-2_12-multilang/data/class/pages/admin/total/LC_Page_Admin_Total.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/admin/total/LC_Page_Admin_Total.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/admin/total/LC_Page_Admin_Total.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -112,8 +112,7 @@
$objFormParam = new SC_FormParam_Ex();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
- $objFormParam->setParam($_POST);
- $objFormParam->setParam($_GET);
+ $objFormParam->setParam($_REQUEST);
// 検索ワードの引き継ぎ
$this->arrHidden = $objFormParam->getSearchArray();
@@ -135,6 +134,7 @@
$type = ($objFormParam->getValue('type')) ? $objFormParam->getValue('type'): 'all';
$this->tpl_page_type = 'total/page_'. $page .'.tpl';
+ // FIXME 可読性が低いので call_user_func_array を使わない (またはメソッド名を1つの定数値とする) 実装に。
list($this->arrResults, $this->tpl_image) = call_user_func_array(array($this, 'lfGetOrder'.$page),
array($type, $sdate, $edate));
if ($this->getMode() == 'csv') {
@@ -220,23 +220,30 @@
$objFormParam->addParam('', 'page');
$objFormParam->addParam('', 'type');
$objFormParam->addParam('', 'mode');
- $objFormParam->addParam('', 'form');
+ $objFormParam->addParam('', 'search_form');
}
/* 入力内容のチェック */
function lfCheckError(&$objFormParam) {
$objFormParam->convParam();
- $objErr = new SC_CheckError_Ex();
+ $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
// 特殊項目チェック
- if ($objFormParam->getValue('form') == 1) {
- $objErr->doFunc(array(t('PARAM_LABEL_MONTHLY'), 'search_startyear_m'), array('ONE_EXIST_CHECK'));
+
+ // 月度集計
+ if ($objFormParam->getValue('search_form') == 1) {
+ $objErr->doFunc(array(t('PARAM_LABEL_MONTHLY'), 'search_startyear_m', 'search_startmonth_m'), array('FULL_EXIST_CHECK'));
}
- if ($objFormParam->getValue('form') == 2) {
- $objErr->doFunc(array(t('PARAM_LABEL_PERIOD'), 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('FULL_EXIST_CHECK'));
+ // 期間集計
+ if ($objFormParam->getValue('search_form') == 2) {
+ $objErr->doFunc(array(t('PARAM_LABEL_PERIOD_1', 'search_startyear', 'search_startmonth', 'search_startday'), array('FULL_EXIST_CHECK'));
+ $objErr->doFunc(array(t('PARAM_LABEL_PERIOD_2', 'search_endyear', 'search_endmonth', 'search_endday'), array('FULL_EXIST_CHECK'));
+ $objErr->doFunc(array(t('PARAM_LABEL_PERIOD_1', 'search_startyear', 'search_startmonth', 'search_startday'), array('CHECK_DATE'));
+ $objErr->doFunc(array(t('PARAM_LABEL_PERIOD_2', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_DATE'));
+ $objErr->doFunc(array(t('PARAM_LABEL_PERIOD_1', t('PARAM_LABEL_PERIOD_2', 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_SET_TERM'));
}
$objErr->doFunc(array(t('PARAM_LABEL_MONTHLY'), 'search_startyear_m', 'search_startmonth_m'), array('ALL_EXIST_CHECK'));
$objErr->doFunc(array(t('PARAM_LABEL_START_DAY'), 'search_startyear', 'search_startmonth', 'search_startday'), array('CHECK_DATE'));
@@ -271,35 +278,19 @@
/* フォームで入力された日付を適切な形にする */
function lfSetStartEndDate(&$objFormParam) {
-
$arrRet = $objFormParam->getHashArray();
- $out_flg = 0;
- foreach ($arrRet as $key => $val) {
- if ($val == '') {
- continue;
- }
- switch ($key) {
- case 'search_startyear':
- $sdate = $objFormParam->getValue('search_startyear') . '/' . $objFormParam->getValue('search_startmonth') . '/' . $objFormParam->getValue('search_startday');
- break;
- case 'search_endyear':
- $edate = $objFormParam->getValue('search_endyear') . '/' . $objFormParam->getValue('search_endmonth') . '/' . $objFormParam->getValue('search_endday');
- break;
- case 'search_startyear_m':
- list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($objFormParam->getValue('search_startyear_m'),
- $objFormParam->getValue('search_startmonth_m'),
- CLOSE_DAY);
- $out_flg = 1;
- break;
- default:
- break;
- }
- // 月度集計の場合に、集計期間が本日日付で上書きされてしまうのを回避するため
- if (($objFormParam->getValue('form') == 1) && ($out_flg == 1)) {
- break;
- }
+ // 月度集計
+ if ($arrRet['search_form'] == 1) {
+ list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($arrRet['search_startyear_m'],
+ $arrRet['search_startmonth_m'],
+ CLOSE_DAY);
}
+ // 期間集計
+ elseif ($arrRet['search_form'] == 2) {
+ $sdate = $arrRet['search_startyear'] . '/' . $arrRet['search_startmonth'] . '/' . $arrRet['search_startday'];
+ $edate = $arrRet['search_endyear'] . '/' . $arrRet['search_endmonth'] . '/' . $arrRet['search_endday'];
+ }
return array($sdate, $edate);
}
変更: branches/version-2_12-multilang/data/class/pages/cart/LC_Page_Cart.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/cart/LC_Page_Cart.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/cart/LC_Page_Cart.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -149,6 +149,9 @@
$this->tpl_message .= $objCartSess->checkProducts($key);
$this->tpl_total_inctax[$key] = $objCartSess->getAllProductsTotal($key);
$totalIncTax += $this->tpl_total_inctax[$key];
+ $this->tpl_total_tax[$key] = $objCartSess->getAllProductsTax($key);
+ // ポイント合計
+ $this->tpl_total_point[$key] = $objCartSess->getAllProductsPoint($key);
$this->arrData[$key] = $objCartSess->calculate($key, $objCustomer);
変更: branches/version-2_12-multilang/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -93,7 +93,7 @@
// おすすめ商品取得
$col = 'T1.best_id, T1.category_id, T1.rank, T1.product_id, T1.title, T1.comment, T1.create_date, T1.update_date';
$table = 'dtb_best_products as T1 INNER JOIN dtb_products as T2 ON T1.product_id = T2.product_id';
- $where = 'T1.del_flg = 0 and T2.status = 1 and T2.del_flg = 0';
+ $where = 'T1.del_flg = 0 and T2.status = 1';
$objQuery->setOrder('T1.rank');
$objQuery->setLimit(RECOMMEND_NUM);
$arrBestProducts = $objQuery->select($col, $table, $where);
変更: branches/version-2_12-multilang/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
===================================================================
--- branches/version-2_12-multilang/data/class/pages/shopping/LC_Page_Shopping_Confirm.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/pages/shopping/LC_Page_Shopping_Confirm.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -103,6 +103,10 @@
$this->arrCartItems = $objCartSess->getCartList($this->cartKey);
// 合計金額
$this->tpl_total_inctax[$this->cartKey] = $objCartSess->getAllProductsTotal($this->cartKey);
+ // 税額
+ $this->tpl_total_tax[$this->cartKey] = $objCartSess->getAllProductsTax($this->cartKey);
+ // ポイント合計
+ $this->tpl_total_point[$this->cartKey] = $objCartSess->getAllProductsPoint($this->cartKey);
// 一時受注テーブルの読込
$arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
変更: branches/version-2_12-multilang/data/class/util/SC_Utils.php
===================================================================
--- branches/version-2_12-multilang/data/class/util/SC_Utils.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/class/util/SC_Utils.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -971,7 +971,7 @@
$start_day = date('d', mktime(0, 0, 0, $tmp_month, $tmp_day + 1, $tmp_year));
// 日付の作成
- $start_date = sprintf('%d/%d/%d 00:00:00', $start_year, $start_month, $start_day);
+ $start_date = sprintf('%d/%d/%d', $start_year, $start_month, $start_day);
$end_date = sprintf('%d/%d/%d 23:59:59', $end_year, $end_month, $end_day);
return array($start_date, $end_date);
変更: branches/version-2_12-multilang/data/locales/ja.mo
===================================================================
(バイナリファイルが異なっています)
変更: branches/version-2_12-multilang/data/locales/ja.po
===================================================================
--- branches/version-2_12-multilang/data/locales/ja.po 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/data/locales/ja.po 2012-12-17 05:25:58 UTC (rev 22144)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: EC-CUBE Core\n"
"POT-Creation-Date: 2012-05-07 13T_39+0900\n"
-"PO-Revision-Date: 2012-12-14 16:15+0900\n"
+"PO-Revision-Date: 2012-12-17 14:15+0900\n"
"Last-Translator: MATSUDA Terutaka <matsudaterutaka @ gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -1190,6 +1190,12 @@
msgid "PARAM_LABEL_PERIOD"
msgstr "期間"
+msgid "PARAM_LABEL_PERIOD_1"
+msgstr "期間(開始日)"
+
+msgid "PARAM_LABEL_PERIOD_2"
+msgstr "期間(終了日)"
+
msgid "PARAM_LABEL_THE_NAME"
msgstr "名称"
@@ -5771,9 +5777,6 @@
msgid "tpl_706"
msgstr "詳細-サブ拡大画像(T_FIELD1)<br />[T_FIELD2×T_FIELD3]"
-msgid "tpl_707"
-msgstr "※T_FIELDは販売商品から削除されています。"
-
msgid "tpl_708"
msgstr "※全国一律送料設定(円):"
変更: branches/version-2_12-multilang/eccube_install.sh
===================================================================
--- branches/version-2_12-multilang/eccube_install.sh 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/eccube_install.sh 2012-12-17 05:25:58 UTC (rev 22144)
@@ -2,159 +2,169 @@
######################################################################
#
-# EC-CUBE の再インストールを行う shell スクリプト
+# EC-CUBE のインストールを行う shell スクリプト
#
-# ※ PostgreSQL 専用
#
-# 1. 既存の EC-CUBE サイトを移動(PREFIX.YYYYMMDD)
-# 2. SVNリポジトリより checkout(tags/EC_CUBE_VERSION)
-# 3. パーミッション変更
-# 4. html/install/sql 配下の SQL を実行
-# 5. 管理者権限をアップデート
-# 6. data/install.php を生成
+# #処理内容
+# 1. パーミッション変更
+# 2. html/install/sql 配下の SQL を実行
+# 3. 管理者権限をアップデート
+# 4. data/config/config.php を生成
#
# 使い方
+# Configurationの内容を自分の環境に併せて修正
+# PostgreSQLの場合は、DBユーザーを予め作成しておいて
+# # ./ec_cube_install.sh pgsql
+# MySQLはMYSQLのRoot以外のユーザーで実行する場合は、128行目をコメントアウトして
+# # ./ec_cube_install.sh mysql
#
-# # ./ec_cube_install.sh /install/path/to/eccube eccube-2.4.1
#
-# この場合の DocumentRoot は, /install/path/to/eccube/html になります.
-#
# 開発コミュニティの関連スレッド
# http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=4918&forum=14&post_id=23090#forumpost23090
#
#######################################################################
-PREFIX=${PREFIX:-"$1"}
-EC_CUBE_VERSION=${EC_CUBE_VERSION:-"$2"}
-
-ADMIN_MAIL=${ADMIN_MAIL:-"shop @ ec-cube.net"}
-SHOP_NAME=${SHOP_NAME:-"ロックオンのふとんやさん"}
-INSTALL_PHP="data/install.php"
-SITE_URL=${SITE_URL:-"http://demo2.ec-cube.net/"}
-SSL_URL=${SSL_URL:-"http://demo2.ec-cube.net/"}
+#######################################################################
+# Configuration
+#-- Shop Configuration
+CONFIG_PHP="data/config/config.php"
+ADMIN_MAIL=${ADMIN_MAIL:-"admin @ example.com"}
+SHOP_NAME=${SHOP_NAME:-"EC-CUBE SHOP"}
+HTTP_URL=${HTTP_URL:-"http://test.local"}
+HTTPS_URL=${HTTPS_URL:-"http://test.local/"}
DOMAIN_NAME=${DOMAIN_NAME:-""}
+ADMINPASS="f6b126507a5d00dbdbb0f326fe855ddf84facd57c5603ffdf7e08fbb46bd633c"
+AUTH_MAGIC="droucliuijeanamiundpnoufrouphudrastiokec"
-TODAY=`date "+%Y%m%d"`
+DBTYPE=$1;
-SVN=svn
-SVN_USER=guest
-SVN_PASSWD=lh1jNhUn
+case "${DBTYPE}" in
+"pgsql" )
+ #-- DB Seting Postgres
+ PSQL=psql
+ PGUSER=postgres
+ DROPDB=dropdb
+ CREATEDB=createdb
+ DBSERVER="127.0.0.1"
+ DBNAME=cube212_dev
+ DBUSER=cube212_dev_user
+ DBPASS=password
+ DBPORT=5432
+;;
+"mysql" )
+ #-- DB Seting MySQL
+ MYSQL=mysql
+ ROOTUSER=root
+ ROOTPASS=password
+ DBSERVER="127.0.0.1"
+ DBNAME=cube212_dev
+ DBUSER=cube212_dev_user
+ DBPASS=password
+ DBPORT=3306
+;;
+* ) echo "ERROR:: argument is invaid"
+exit
+;;
+esac
-REPOSITORY="https://svn.ec-cube.net/open/tags/"
-PGUSER=postgres
-DROPDB=dropdb
-CREATEDB=createdb
-PSQL=psql
+#######################################################################
+# Install
-DBSERVER="127.0.0.1"
-DBNAME=demo2_db
-DBUSER=demo2_db_user
-DBPASS=password
-DBPORT=5432
+#-- Update Permissions
+echo "update permissions..."
+chmod -R 777 "./html"
+chmod 755 "./data"
+chmod -R 777 "./data/Smarty"
+chmod -R 777 "./data/cache"
+chmod -R 777 "./data/class"
+chmod -R 755 "./data/class_extends"
+chmod 777 "./data/config"
+chmod -R 777 "./data/download"
+chmod -R 777 "./data/downloads"
+chmod 755 "./data/fonts"
+chmod 755 "./data/include"
+chmod 777 "./data/logs"
+chmod -R 777 "./data/module"
+chmod 755 "./data/smarty_extends"
+chmod 777 "./data/upload"
+chmod 777 "./data/upload/csv"
+#-- Setup Database
+SQL_DIR="./html/install/sql"
OPTIONAL_SQL_FILE=optional.sql
-
-
-echo "PREFIX=${PREFIX}"
-echo "EC_CUBE_VERSION=${EC_CUBE_VERSION}"
-
-if [ -d ${PREFIX} ]
-then
- echo "backup old version..."
- mv ${PREFIX} "${PREFIX}.${TODAY}"
-fi
-
if [ -f ${OPTIONAL_SQL_FILE} ]
then
echo "remove optional SQL"
rm ${OPTIONAL_SQL_FILE}
fi
-echo "checkout sources from svn.ec-cube.net..."
-${SVN} checkout --username ${SVN_USER} --password ${SVN_PASSWD} \
- "${REPOSITORY}/${EC_CUBE_VERSION}" ${PREFIX}
+echo "create optional SQL..."
+echo "INSERT INTO dtb_member (member_id, login_id, password, salt, work, del_flg, authority, creator_id, rank, update_date) VALUES (2, 'admin', '${ADMINPASS}', '${AUTH_MAGIC}', '1', '0', '0', '0', '1', current_timestamp);" >> ${OPTIONAL_SQL_FILE}
+echo "INSERT INTO dtb_baseinfo (id, shop_name, email01, email02, email03, email04, email05, top_tpl, product_tpl, detail_tpl, mypage_tpl, update_date) VALUES (1, '${SHOP_NAME}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', 'default1', 'default1', 'default1', 'default1', current_timestamp);" >> ${OPTIONAL_SQL_FILE}
-echo "update permissions..."
-chmod -R 777 "${PREFIX}/data/cache"
-chmod -R 777 "${PREFIX}/data/class"
-chmod -R 777 "${PREFIX}/data/Smarty"
-chmod -R 777 "${PREFIX}/data/logs"
-chmod -R 777 "${PREFIX}/data/downloads"
-chmod -R 777 "${PREFIX}/html/install/temp"
-chmod -R 777 "${PREFIX}/html/user_data"
-chmod -R 777 "${PREFIX}/html/cp"
-chmod -R 777 "${PREFIX}/html/upload"
-#echo "dropdb..."
-#su ${PGUSER} -c "${DROPDB} ${DBNAME}"
+case "${DBTYPE}" in
+"pgsql" )
+ # PostgreSQL
+ echo "dropdb..."
+ sudo -u ${PGUSER} ${DROPDB} ${DBNAME}
+ echo "createdb..."
+ sudo -u ${PGUSER} ${CREATEDB} -U ${DBUSER} ${DBNAME}
+ echo "create table..."
+ sudo -u ${PGUSER} ${PSQL} -U ${DBUSER} -f ${SQL_DIR}/create_table_pgsql.sql ${DBNAME}
+ echo "insert data..."
+ sudo -u ${PGUSER} ${PSQL} -U ${DBUSER} -f ${SQL_DIR}/insert_data.sql ${DBNAME}
+ echo "execute optional SQL..."
+ sudo -u ${PGUSER} ${PSQL} -U ${DBUSER} -f ${OPTIONAL_SQL_FILE} ${DBNAME}
+;;
+"mysql" )
+ # MySQL
+ echo "dropdb..."
+ ${MYSQL} -u ${ROOTUSER} -p${ROOTPASS} -e "drop database ${DBNAME}"
+ echo "createdb..."
+ ${MYSQL} -u ${ROOTUSER} -p${ROOTPASS} -e "create database ${DBNAME}"
+ #echo "grant user..."
+ #${MYSQL} -u ${ROOTUSER} -p${ROOTPASS} -e "GRANT ALL ON ${DBNAME}.* TO '${DBUSER}'@'%' IDENTIFIED BY '${DBPASS}'"
+ echo "create table..."
+ ${MYSQL} -u ${DBUSER} -p${DBPASS} ${DBNAME} < ${SQL_DIR}/create_table_mysql.sql
+ echo "insert data..."
+ ${MYSQL} -u ${DBUSER} -p${DBPASS} ${DBNAME} < ${SQL_DIR}/insert_data.sql
+ echo "execute optional SQL..."
+ ${MYSQL} -u ${DBUSER} -p${DBPASS} ${DBNAME} < ${OPTIONAL_SQL_FILE}
+;;
+esac
-#echo "createdb..."
-#su ${PGUSER} -c "${CREATEDB} -U ${DBUSER} ${DBNAME}"
+#-- Setup Initial Data
-SQL_DIR="${PREFIX}/html/install/sql"
-
-echo "drop view..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/drop_view.sql ${DBNAME}"
-
-echo "drop tables..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/drop_table.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_session;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_module;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_campaign_order;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_mobile_kara_mail;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_mobile_ext_session_id;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_site_control;' ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -c 'DROP TABLE dtb_trackback;' ${DBNAME}"
-
-echo "create table..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/create_table_pgsql.sql ${DBNAME}"
-
-echo "create_view..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/create_view.sql ${DBNAME}"
-
-echo "adding tables..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_campaign_order_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_mobile_ext_session_id_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_mobile_kara_mail_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_module_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_session_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_site_control_pgsql.sql ${DBNAME}"
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/add/dtb_trackback_pgsql.sql ${DBNAME}"
-
-echo "insert data..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${SQL_DIR}/insert_data.sql ${DBNAME}"
-
-echo "create optional SQL..."
-echo "INSERT INTO dtb_member (member_id, login_id, password, authority, creator_id) VALUES ('1', 'admin', '2c19f4a742398150cecc80b3e76b673a35b8c19c', '0', '0');" >> ${OPTIONAL_SQL_FILE}
-echo "INSERT INTO dtb_baseinfo (shop_name, email01, email02, email03, email04, email05, top_tpl, product_tpl, detail_tpl, mypage_tpl) VALUES ('${SHOP_NAME}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', '${ADMIN_MAIL}', 'default1', 'default1', 'default1', 'default1');" >> ${OPTIONAL_SQL_FILE}
-echo "execute optional SQL..."
-su ${PGUSER} -c "${PSQL} -U ${DBUSER} -f ${OPTIONAL_SQL_FILE} ${DBNAME}"
-
echo "copy images..."
-cp -rv "${PREFIX}/html/install/save_image" "${PREFIX}/html/upload/"
+cp -rv "./html/install/save_image" "./html/upload/"
-echo "creating ${INSTALL_PHP}..."
-cat > "${PREFIX}/${INSTALL_PHP}" <<EOF
+echo "creating ${CONFIG_PHP}..."
+cat > "./${CONFIG_PHP}" <<EOF
<?php
-define ('ECCUBE_INSTALL', 'ON');
-define ('HTML_PATH', '${PREFIX}/html/');
-define ('SITE_URL', '${SITE_URL}');
-define ('SSL_URL', '${SSL_URL}');
-define ('URL_DIR', '/');
-define ('DOMAIN_NAME', '${DOMAIN_NAME}');
-define ('DB_TYPE', 'pgsql');
-define ('DB_USER', '${DBUSER}');
-define ('DB_PASSWORD', '${DBPASS}');
-define ('DB_SERVER', '${DBSERVER}');
-define ('DB_NAME', '${DBNAME}');
-define ('DB_PORT', '${DBPORT}');
-define ('DATA_PATH', '${PREFIX}/data/');
-define ('MOBILE_HTML_PATH', HTML_PATH . 'mobile/');
-define ('MOBILE_SITE_URL', SITE_URL . 'mobile/');
-define ('MOBILE_SSL_URL', SSL_URL . 'mobile/');
-define ('MOBILE_URL_DIR', URL_DIR . 'mobile/');
-?>
+define('ECCUBE_INSTALL', 'ON');
+define('HTTP_URL', '${HTTP_URL}');
+define('HTTPS_URL', '${HTTPS_URL}');
+define('ROOT_URLPATH', '/');
+define('DOMAIN_NAME', '${DOMAIN_NAME}');
+define('DB_TYPE', '${DBTYPE}');
+define('DB_USER', '${DBUSER}');
+define('DB_PASSWORD', '${DBPASS}');
+define('DB_SERVER', '${DBSERVER}');
+define('DB_NAME', '${DBNAME}');
+define('DB_PORT', '${DBPORT}');
+define('ADMIN_DIR', 'admin/');
+define('ADMIN_FORCE_SSL', FALSE);
+define('ADMIN_ALLOW_HOSTS', 'a:0:{}');
+define('AUTH_MAGIC', '${AUTH_MAGIC}');
+define('PASSWORD_HASH_ALGOS', 'sha256');
+define('MAIL_BACKEND', 'mail');
+define('SMTP_HOST', '');
+define('SMTP_PORT', '');
+define('SMTP_USER', '');
+define('SMTP_PASSWORD', '');
+
EOF
echo "Finished Successful!"
\ No newline at end of file
Property changes on: branches/version-2_12-multilang/tests
___________________________________________________________________
追加: svn:ignore
+ phpunit.xml
require.php
削除: branches/version-2_12-multilang/tests/class/Common_TestCase.php
===================================================================
--- branches/version-2_12-dev/tests/class/Common_TestCase.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/Common_TestCase.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,98 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../..";
-require_once($HOME . "/tests/class/replace/SC_Display_Ex.php");
-require_once($HOME . "/tests/class/replace/SC_Response_Ex.php");
-require_once($HOME . "/tests/class/test/util/Test_Utils.php");
-require_once($HOME . "/tests/class/test/util/User_Utils.php");
-require_once($HOME . "/tests/require.php");
-
-require_once($HOME . "/data/class/pages/LC_Page_Index.php");
-/**
- * 全テストケースの基底クラスです。
- * SC_Queryのテスト以外は基本的にこのクラスを継承して作成してください。
- *
- */
-class Common_TestCase extends PHPUnit_Framework_TestCase {
-
- /** SC_Query インスタンス */
- protected $objQuery;
-
- /** 期待値 */
- protected $expected;
- /** 実際の値 */
- protected $actual;
-
- protected function setUp() {
- $this->objQuery = SC_Query_Ex::getSingletonInstance();
- $this->objQuery->begin();
- }
-
- protected function tearDown() {
- $this->objQuery->rollback();
- $this->objQuery = null;
- }
-
- /**
- * 各テストfunctionの末尾で呼び出し、期待値と実際の値の比較を行います。
- * 呼び出す前に、$expectedに期待値を、$actualに実際の値を導入してください。
- */
- protected function verify($message = null) {
- $this->assertEquals($this->expected, $this->actual, $message);
- }
-
- //////////////////////////////////////////////////////////////////
- // 以下はテスト用のユーティリティを使うためのサンプルです。
- // 実際に動作させる場合にはコメントアウトを外して下さい。
-
- /**
- * actionExit()呼び出しを書き換えてexit()させない例です。
- */
- /**
- public function testExit() {
- $resp = new SC_Response_Ex();
- $resp->actionExit();
-
- $this->expected = TRUE;
- $this->actual = $resp->isExited();
- $this->verify('exitしたかどうか');
- }
- */
-
- /**
- * 端末種別をテストケースから自由に設定する例です。
- */
- /**
- public function testDeviceType() {
- $this->expected = array(DEVICE_TYPE_MOBILE, DEVICE_TYPE_SMARTPHONE);
- $this->actual = array();
-
- // 端末種別を設定
- User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
- $this->actual[0] = SC_Display_Ex::detectDevice();
- User_Utils::setDeviceType(DEVICE_TYPE_SMARTPHONE);
- $this->actual[1] = SC_Display_Ex::detectDevice();
-
- $this->verify('端末種別');
- }
- */
-
- /**
- * ログイン状態をテストケースから自由に切り替える例です。
- */
- /**
- public function testLoginState() {
- $this->expected = array(FALSE, TRUE);
- $this->actual = array();
-
- $objCustomer = new SC_Customer_Ex();
- User_Utils::setLoginState(FALSE);
- $this->actual[0] = $objCustomer->isLoginSuccess();
- User_Utils::setLoginState(TRUE, null, $this->objQuery);
- $this->actual[1] = $objCustomer->isLoginSuccess();
-
- $this->verify('ログイン状態');
- }
- */
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/Common_TestCase.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/Common_TestCase.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/Common_TestCase.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/Common_TestCase.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,98 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../..";
+require_once($HOME . "/tests/class/replace/SC_Display_Ex.php");
+require_once($HOME . "/tests/class/replace/SC_Response_Ex.php");
+require_once($HOME . "/tests/class/test/util/Test_Utils.php");
+require_once($HOME . "/tests/class/test/util/User_Utils.php");
+require_once($HOME . "/tests/require.php");
+
+require_once($HOME . "/data/class/pages/LC_Page_Index.php");
+/**
+ * 全テストケースの基底クラスです。
+ * SC_Queryのテスト以外は基本的にこのクラスを継承して作成してください。
+ *
+ */
+class Common_TestCase extends PHPUnit_Framework_TestCase {
+
+ /** SC_Query インスタンス */
+ protected $objQuery;
+
+ /** 期待値 */
+ protected $expected;
+ /** 実際の値 */
+ protected $actual;
+
+ protected function setUp() {
+ $this->objQuery = SC_Query_Ex::getSingletonInstance();
+ $this->objQuery->begin();
+ }
+
+ protected function tearDown() {
+ $this->objQuery->rollback();
+ $this->objQuery = null;
+ }
+
+ /**
+ * 各テストfunctionの末尾で呼び出し、期待値と実際の値の比較を行います。
+ * 呼び出す前に、$expectedに期待値を、$actualに実際の値を導入してください。
+ */
+ protected function verify($message = null) {
+ $this->assertEquals($this->expected, $this->actual, $message);
+ }
+
+ //////////////////////////////////////////////////////////////////
+ // 以下はテスト用のユーティリティを使うためのサンプルです。
+ // 実際に動作させる場合にはコメントアウトを外して下さい。
+
+ /**
+ * actionExit()呼び出しを書き換えてexit()させない例です。
+ */
+ /**
+ public function testExit() {
+ $resp = new SC_Response_Ex();
+ $resp->actionExit();
+
+ $this->expected = TRUE;
+ $this->actual = $resp->isExited();
+ $this->verify('exitしたかどうか');
+ }
+ */
+
+ /**
+ * 端末種別をテストケースから自由に設定する例です。
+ */
+ /**
+ public function testDeviceType() {
+ $this->expected = array(DEVICE_TYPE_MOBILE, DEVICE_TYPE_SMARTPHONE);
+ $this->actual = array();
+
+ // 端末種別を設定
+ User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
+ $this->actual[0] = SC_Display_Ex::detectDevice();
+ User_Utils::setDeviceType(DEVICE_TYPE_SMARTPHONE);
+ $this->actual[1] = SC_Display_Ex::detectDevice();
+
+ $this->verify('端末種別');
+ }
+ */
+
+ /**
+ * ログイン状態をテストケースから自由に切り替える例です。
+ */
+ /**
+ public function testLoginState() {
+ $this->expected = array(FALSE, TRUE);
+ $this->actual = array();
+
+ $objCustomer = new SC_Customer_Ex();
+ User_Utils::setLoginState(FALSE);
+ $this->actual[0] = $objCustomer->isLoginSuccess();
+ User_Utils::setLoginState(TRUE, null, $this->objQuery);
+ $this->actual[1] = $objCustomer->isLoginSuccess();
+
+ $this->verify('ログイン状態');
+ }
+ */
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,439 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Helper_Purchase_TestBase extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- /**
- * セッションに配送情報を設定します。
- */
- protected function setUpShipping($shipping) {
- if (!$shipping) {
- $shipping = getSingleShipping();
- }
-
- $_SESSION['shipping'] = $shipping;
- }
-
- protected function getSingleShipping() {
- return array(
- '00001' => array(
- 'shipment_id' => '00001',
- 'shipment_item' => '商品1',
- 'shipping_pref' => '東京都')
- );
- }
-
- protected function getMultipleShipping() {
- return array(
- '00001' => array(
- 'shipment_id' => '00001',
- 'shipment_item' => array('商品1'),
- 'shipping_pref' => '東京都'),
- '00002' => array(
- 'shipment_id' => '00002',
- 'shipment_item' => array('商品2'),
- 'shipping_pref' => '沖縄県'),
- '00003' => array(
- 'shipment_id' => '00003',
- 'shipment_item' => array(),
- 'shipping_pref' => '埼玉県')
- );
- }
-
- /**
- * DBに配送情報を設定します。
- */
- protected function setUpShippingOnDb() {
- $shippings = array(
- array(
- 'shipping_id' => '1',
- 'order_id' => '1',
- 'shipping_name01' => '配送情報01',
- 'shipping_date' => '2012-01-12'
- ),
- array(
- 'shipping_id' => '2',
- 'order_id' => '2',
- 'shipping_name01' => '配送情報02',
- 'shipping_date' => '2011-10-01'
- )
- );
-
- foreach ($shippings as $key => $item) {
- $this->objQuery->insert('dtb_shipping', $item);
- }
- }
-
- /**
- * DBに配送商品情報を設定します。
- */
- protected function setUpShipmentItem() {
- $shipping_items = array(
- array(
- 'shipping_id' => '1',
- 'product_class_id' => '1001',
- 'order_id' => '1',
- 'product_name' => '商品名01',
- 'price' => '1500'
- ),
- array(
- 'shipping_id' => '1',
- 'product_class_id' => '1002',
- 'order_id' => '1',
- 'product_name' => '商品名02',
- 'price' => '2400'
- )
- );
-
- foreach ($shipping_items as $key => $item) {
- $this->objQuery->insert('dtb_shipment_item', $item);
- }
- $this->setUpProductClass();
- }
-
- /**
- * DBに商品クラス情報を設定します.
- */
- protected function setUpProductClass() {
- $product_class = array(
- array(
- 'product_class_id' => '1001',
- 'product_id' => '1001',
- 'product_type_id' => '1001',
- 'product_code' => 'code1001',
- 'classcategory_id1' => '1001',
- 'classcategory_id2' => '1002',
- 'price01' => '1500',
- 'price02' => '1500',
- 'del_flg' => '0'
- ),
- array(
- 'product_class_id' => '1002',
- 'product_id' => '1002',
- 'product_type_id' => '1002',
- 'del_flg' => '0'
- )
- );
-
- 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(
- 'classcategory_id' => '1001',
- 'name' => 'cat1001'
- ),
- array(
- 'classcategory_id' => '1002',
- 'name' => 'cat1002'
- )
- );
-
- foreach ($class_category as $key => $item) {
- $this->objQuery->insert('dtb_classcategory', $item);
- }
- }
-
- /**
- * DBに製品情報を登録します.
- */
- protected function setUpProducts() {
- $products = array(
- array(
- 'product_id' => '1001',
- 'name' => '製品名1001',
- 'del_flg' => '0',
- 'status' => '1'
- ),
- array(
- 'product_id' => '1002',
- 'name' => '製品名1002',
- 'del_flg' => '0',
- 'status' => '2'
- )
- );
-
- foreach ($products as $key => $item) {
- $this->objQuery->insert('dtb_products', $item);
- }
- }
-
- /**
- * DBに支払方法の情報を登録します.
- */
- protected function setUpPaymentOptions() {
- $payment_options = array(
- array(
- 'deliv_id' => '2001',
- 'payment_id' => '2001',
- 'rank' => '1'
- ),
- array(
- 'deliv_id' => '1001',
- 'payment_id' => '1001',
- 'rank' => '2'
- ),
- array(
- 'deliv_id' => '1001',
- 'payment_id' => '1002',
- 'rank' => '1'
- ),
- array(
- 'deliv_id' => '1003',
- 'payment_id' => '3001',
- 'rank' => '1'
- ),
- array(
- 'deliv_id' => '1003',
- 'payment_id' => '3002',
- 'rank' => '2'
- ),
- array(
- 'deliv_id' => '1003',
- 'payment_id' => '3003',
- 'rank' => '3'
- ),
- array(
- 'deliv_id' => '1003',
- 'payment_id' => '3004',
- 'rank' => '4'
- ),
- array(
- 'deliv_id' => '1003',
- 'payment_id' => '3005',
- 'rank' => '5'
- )
- );
-
- foreach ($payment_options as $key => $item) {
- $this->objQuery->insert('dtb_payment_options', $item);
- }
- }
-
- /**
- * DBに配送業者の情報を登録します.
- */
- protected function setUpDeliv() {
- $deliv = array(
- array( // 削除フラグON
- 'deliv_id' => '2001',
- 'product_type_id' => '1001',
- 'name' => '配送業者del',
- 'rank' => '1',
- 'del_flg' => '1'
- ),
- array(
- 'deliv_id' => '1001',
- 'product_type_id' => '1001',
- 'name' => '配送業者01',
- 'rank' => '2'
- ),
- array(
- 'deliv_id' => '1002',
- 'product_type_id' => '1001',
- 'name' => '配送業者02',
- 'rank' => '3'
- ),
- array( // 商品種別違い
- 'deliv_id' => '1004',
- 'product_type_id' => '2001',
- 'name' => '配送業者21',
- 'rank' => '4'
- ),
- );
-
- foreach ($deliv as $key => $item) {
- $this->objQuery->insert('dtb_deliv', $item);
- }
- }
-
- /**
- * DBにお届け時間の情報を登録します.
- */
- protected function setUpDelivTime() {
- $deliv_time = array(
- array(
- 'deliv_id' => '1002',
- 'time_id' => '1',
- 'deliv_time' => '午前'
- ),
- array(
- 'deliv_id' => '1001',
- 'time_id' => '2',
- 'deliv_time' => '午後'
- ),
- array(
- 'deliv_id' => '1001',
- 'time_id' => '1',
- 'deliv_time' => '午前'
- ),
- );
-
- foreach ($deliv_time as $key => $item) {
- $this->objQuery->insert('dtb_delivtime', $item);
- }
- }
-
- /**
- * DBに支払方法の情報を登録します.
- */
- protected function setUpPayment() {
- $payment = array(
- array(
- 'payment_id' => '1001',
- 'payment_method' => '支払方法1001'
- ),
- array(
- 'payment_id' => '1002',
- 'payment_method' => '支払方法1002',
- 'del_flg' => '1'
- ),
- array(
- 'payment_id' => '1003',
- 'payment_method' => '支払方法1003'
- ),
- array(
- 'payment_id' => '3001',
- 'payment_method' => '支払方法3001',
- 'del_flg' => '1'
- ),
- array(
- 'payment_id' => '3002',
- 'payment_method' => '支払方法3002'
- ),
- array(
- 'payment_id' => '3003',
- 'payment_method' => '支払方法3003',
- 'rule_max' => 10000
- ),
- array(
- 'payment_id' => '3004',
- 'payment_method' => '支払方法3004',
- 'upper_rule' => 20000
- ),
- array(
- 'payment_id' => '3005',
- 'payment_method' => '支払方法3005',
- 'rule_max' => 12000,
- 'upper_rule' => 21000
- )
- );
-
- foreach ($payment as $key => $item) {
- $this->objQuery->insert('dtb_payment', $item);
- }
- }
-
- /**
- * DBに受注情報を設定します.
- */
- protected function setUpOrder() {
- $order = array(
- array(
- 'order_id' => '1001',
- 'customer_id' => '1001',
- 'order_name01' => '受注情報01',
- 'status' => '3',
- 'payment_date' => '2032-12-31 01:20:30' // 日付が変わっても良いように、遠い未来に設定
- ),
- array(
- 'order_id' => '1002',
- 'customer_id' => '1002',
- 'order_name01' => '受注情報02'
- )
- );
-
- foreach ($order as $item) {
- $this->objQuery->insert('dtb_order', $item);
- }
- }
-
- /**
- * DBに受注一時情報を設定します.
- */
- protected function setUpOrderTemp() {
- $order = array(
- array(
- 'order_temp_id' => '1001',
- 'customer_id' => '1001',
- 'order_name01' => '受注情報01'
- ),
- array(
- 'order_temp_id' => '1002',
- 'customer_id' => '1002',
- 'order_name01' => '受注情報02'
- )
- );
-
- foreach ($order as $item) {
- $this->objQuery->insert('dtb_order_temp', $item);
- }
- }
-
- /**
- * DBに受注詳細を設定します.
- */
- protected function setUpOrderDetail() {
- $order_detail = array(
- array(
- 'order_detail_id' => '1001',
- 'order_id' => '1001',
- 'product_id' => '1002',
- 'product_class_id' => '1002',
- 'product_code' => 'pc1002',
- 'product_name' => '製品名1002',
- 'classcategory_name1' => 'cat10021',
- 'classcategory_name2' => 'cat10022',
- 'price' => 3000,
- 'quantity' => 10,
- 'point_rate' => 5
- ),
- array(
- 'order_detail_id' => '1002',
- 'order_id' => '1001',
- 'product_id' => '1001',
- 'product_class_id' => '1001',
- 'product_code' => 'pc1001',
- 'product_name' => '製品名1001',
- 'classcategory_name1' => 'cat10011',
- 'classcategory_name2' => 'cat10012',
- 'price' => 4000,
- 'quantity' => 15,
- 'point_rate' => 6
- ),
- array(
- 'order_detail_id' => '1003',
- 'order_id' => '1002',
- 'product_id' => '1001',
- 'product_class_id' => '1001'
- )
- );
-
- foreach ($order_detail as $item) {
- $this->objQuery->insert('dtb_order_detail', $item);
- }
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,439 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_TestBase extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ /**
+ * セッションに配送情報を設定します。
+ */
+ protected function setUpShipping($shipping) {
+ if (!$shipping) {
+ $shipping = getSingleShipping();
+ }
+
+ $_SESSION['shipping'] = $shipping;
+ }
+
+ protected function getSingleShipping() {
+ return array(
+ '00001' => array(
+ 'shipment_id' => '00001',
+ 'shipment_item' => '商品1',
+ 'shipping_pref' => '東京都')
+ );
+ }
+
+ protected function getMultipleShipping() {
+ return array(
+ '00001' => array(
+ 'shipment_id' => '00001',
+ 'shipment_item' => array('商品1'),
+ 'shipping_pref' => '東京都'),
+ '00002' => array(
+ 'shipment_id' => '00002',
+ 'shipment_item' => array('商品2'),
+ 'shipping_pref' => '沖縄県'),
+ '00003' => array(
+ 'shipment_id' => '00003',
+ 'shipment_item' => array(),
+ 'shipping_pref' => '埼玉県')
+ );
+ }
+
+ /**
+ * DBに配送情報を設定します。
+ */
+ protected function setUpShippingOnDb() {
+ $shippings = array(
+ array(
+ 'shipping_id' => '1',
+ 'order_id' => '1',
+ 'shipping_name01' => '配送情報01',
+ 'shipping_date' => '2012-01-12'
+ ),
+ array(
+ 'shipping_id' => '2',
+ 'order_id' => '2',
+ 'shipping_name01' => '配送情報02',
+ 'shipping_date' => '2011-10-01'
+ )
+ );
+
+ foreach ($shippings as $key => $item) {
+ $this->objQuery->insert('dtb_shipping', $item);
+ }
+ }
+
+ /**
+ * DBに配送商品情報を設定します。
+ */
+ protected function setUpShipmentItem() {
+ $shipping_items = array(
+ array(
+ 'shipping_id' => '1',
+ 'product_class_id' => '1001',
+ 'order_id' => '1',
+ 'product_name' => '商品名01',
+ 'price' => '1500'
+ ),
+ array(
+ 'shipping_id' => '1',
+ 'product_class_id' => '1002',
+ 'order_id' => '1',
+ 'product_name' => '商品名02',
+ 'price' => '2400'
+ )
+ );
+
+ foreach ($shipping_items as $key => $item) {
+ $this->objQuery->insert('dtb_shipment_item', $item);
+ }
+ $this->setUpProductClass();
+ }
+
+ /**
+ * DBに商品クラス情報を設定します.
+ */
+ protected function setUpProductClass() {
+ $product_class = array(
+ array(
+ 'product_class_id' => '1001',
+ 'product_id' => '1001',
+ 'product_type_id' => '1001',
+ 'product_code' => 'code1001',
+ 'classcategory_id1' => '1001',
+ 'classcategory_id2' => '1002',
+ 'price01' => '1500',
+ 'price02' => '1500',
+ 'del_flg' => '0'
+ ),
+ array(
+ 'product_class_id' => '1002',
+ 'product_id' => '1002',
+ 'product_type_id' => '1002',
+ 'del_flg' => '0'
+ )
+ );
+
+ 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(
+ 'classcategory_id' => '1001',
+ 'name' => 'cat1001'
+ ),
+ array(
+ 'classcategory_id' => '1002',
+ 'name' => 'cat1002'
+ )
+ );
+
+ foreach ($class_category as $key => $item) {
+ $this->objQuery->insert('dtb_classcategory', $item);
+ }
+ }
+
+ /**
+ * DBに製品情報を登録します.
+ */
+ protected function setUpProducts() {
+ $products = array(
+ array(
+ 'product_id' => '1001',
+ 'name' => '製品名1001',
+ 'del_flg' => '0',
+ 'status' => '1'
+ ),
+ array(
+ 'product_id' => '1002',
+ 'name' => '製品名1002',
+ 'del_flg' => '0',
+ 'status' => '2'
+ )
+ );
+
+ foreach ($products as $key => $item) {
+ $this->objQuery->insert('dtb_products', $item);
+ }
+ }
+
+ /**
+ * DBに支払方法の情報を登録します.
+ */
+ protected function setUpPaymentOptions() {
+ $payment_options = array(
+ array(
+ 'deliv_id' => '2001',
+ 'payment_id' => '2001',
+ 'rank' => '1'
+ ),
+ array(
+ 'deliv_id' => '1001',
+ 'payment_id' => '1001',
+ 'rank' => '2'
+ ),
+ array(
+ 'deliv_id' => '1001',
+ 'payment_id' => '1002',
+ 'rank' => '1'
+ ),
+ array(
+ 'deliv_id' => '1003',
+ 'payment_id' => '3001',
+ 'rank' => '1'
+ ),
+ array(
+ 'deliv_id' => '1003',
+ 'payment_id' => '3002',
+ 'rank' => '2'
+ ),
+ array(
+ 'deliv_id' => '1003',
+ 'payment_id' => '3003',
+ 'rank' => '3'
+ ),
+ array(
+ 'deliv_id' => '1003',
+ 'payment_id' => '3004',
+ 'rank' => '4'
+ ),
+ array(
+ 'deliv_id' => '1003',
+ 'payment_id' => '3005',
+ 'rank' => '5'
+ )
+ );
+
+ foreach ($payment_options as $key => $item) {
+ $this->objQuery->insert('dtb_payment_options', $item);
+ }
+ }
+
+ /**
+ * DBに配送業者の情報を登録します.
+ */
+ protected function setUpDeliv() {
+ $deliv = array(
+ array( // 削除フラグON
+ 'deliv_id' => '2001',
+ 'product_type_id' => '1001',
+ 'name' => '配送業者del',
+ 'rank' => '1',
+ 'del_flg' => '1'
+ ),
+ array(
+ 'deliv_id' => '1001',
+ 'product_type_id' => '1001',
+ 'name' => '配送業者01',
+ 'rank' => '2'
+ ),
+ array(
+ 'deliv_id' => '1002',
+ 'product_type_id' => '1001',
+ 'name' => '配送業者02',
+ 'rank' => '3'
+ ),
+ array( // 商品種別違い
+ 'deliv_id' => '1004',
+ 'product_type_id' => '2001',
+ 'name' => '配送業者21',
+ 'rank' => '4'
+ ),
+ );
+
+ foreach ($deliv as $key => $item) {
+ $this->objQuery->insert('dtb_deliv', $item);
+ }
+ }
+
+ /**
+ * DBにお届け時間の情報を登録します.
+ */
+ protected function setUpDelivTime() {
+ $deliv_time = array(
+ array(
+ 'deliv_id' => '1002',
+ 'time_id' => '1',
+ 'deliv_time' => '午前'
+ ),
+ array(
+ 'deliv_id' => '1001',
+ 'time_id' => '2',
+ 'deliv_time' => '午後'
+ ),
+ array(
+ 'deliv_id' => '1001',
+ 'time_id' => '1',
+ 'deliv_time' => '午前'
+ ),
+ );
+
+ foreach ($deliv_time as $key => $item) {
+ $this->objQuery->insert('dtb_delivtime', $item);
+ }
+ }
+
+ /**
+ * DBに支払方法の情報を登録します.
+ */
+ protected function setUpPayment() {
+ $payment = array(
+ array(
+ 'payment_id' => '1001',
+ 'payment_method' => '支払方法1001'
+ ),
+ array(
+ 'payment_id' => '1002',
+ 'payment_method' => '支払方法1002',
+ 'del_flg' => '1'
+ ),
+ array(
+ 'payment_id' => '1003',
+ 'payment_method' => '支払方法1003'
+ ),
+ array(
+ 'payment_id' => '3001',
+ 'payment_method' => '支払方法3001',
+ 'del_flg' => '1'
+ ),
+ array(
+ 'payment_id' => '3002',
+ 'payment_method' => '支払方法3002'
+ ),
+ array(
+ 'payment_id' => '3003',
+ 'payment_method' => '支払方法3003',
+ 'rule_max' => 10000
+ ),
+ array(
+ 'payment_id' => '3004',
+ 'payment_method' => '支払方法3004',
+ 'upper_rule' => 20000
+ ),
+ array(
+ 'payment_id' => '3005',
+ 'payment_method' => '支払方法3005',
+ 'rule_max' => 12000,
+ 'upper_rule' => 21000
+ )
+ );
+
+ foreach ($payment as $key => $item) {
+ $this->objQuery->insert('dtb_payment', $item);
+ }
+ }
+
+ /**
+ * DBに受注情報を設定します.
+ */
+ protected function setUpOrder() {
+ $order = array(
+ array(
+ 'order_id' => '1001',
+ 'customer_id' => '1001',
+ 'order_name01' => '受注情報01',
+ 'status' => '3',
+ 'payment_date' => '2032-12-31 01:20:30' // 日付が変わっても良いように、遠い未来に設定
+ ),
+ array(
+ 'order_id' => '1002',
+ 'customer_id' => '1002',
+ 'order_name01' => '受注情報02'
+ )
+ );
+
+ foreach ($order as $item) {
+ $this->objQuery->insert('dtb_order', $item);
+ }
+ }
+
+ /**
+ * DBに受注一時情報を設定します.
+ */
+ protected function setUpOrderTemp() {
+ $order = array(
+ array(
+ 'order_temp_id' => '1001',
+ 'customer_id' => '1001',
+ 'order_name01' => '受注情報01'
+ ),
+ array(
+ 'order_temp_id' => '1002',
+ 'customer_id' => '1002',
+ 'order_name01' => '受注情報02'
+ )
+ );
+
+ foreach ($order as $item) {
+ $this->objQuery->insert('dtb_order_temp', $item);
+ }
+ }
+
+ /**
+ * DBに受注詳細を設定します.
+ */
+ protected function setUpOrderDetail() {
+ $order_detail = array(
+ array(
+ 'order_detail_id' => '1001',
+ 'order_id' => '1001',
+ 'product_id' => '1002',
+ 'product_class_id' => '1002',
+ 'product_code' => 'pc1002',
+ 'product_name' => '製品名1002',
+ 'classcategory_name1' => 'cat10021',
+ 'classcategory_name2' => 'cat10022',
+ 'price' => 3000,
+ 'quantity' => 10,
+ 'point_rate' => 5
+ ),
+ array(
+ 'order_detail_id' => '1002',
+ 'order_id' => '1001',
+ 'product_id' => '1001',
+ 'product_class_id' => '1001',
+ 'product_code' => 'pc1001',
+ 'product_name' => '製品名1001',
+ 'classcategory_name1' => 'cat10011',
+ 'classcategory_name2' => 'cat10012',
+ 'price' => 4000,
+ 'quantity' => 15,
+ 'point_rate' => 6
+ ),
+ array(
+ 'order_detail_id' => '1003',
+ 'order_id' => '1002',
+ 'product_id' => '1001',
+ 'product_class_id' => '1001'
+ )
+ );
+
+ foreach ($order_detail as $item) {
+ $this->objQuery->insert('dtb_order_detail', $item);
+ }
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,79 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_clearShipmentItemTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testClearShipmentItem_配送先ID未指定の場合_全ての配送商品がクリアされる() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $helper = new SC_Helper_Purchase();
- $helper->clearShipmentItemTemp(); // default:null
-
- $this->expected = array('00001'=>null, '00002'=>null, '00003'=>null);
- $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
- $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
- $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
-
- $this->verify('配送商品');
- }
-
- public function testClearShipmentItem_配送先ID指定の場合_指定したIDの配送商品がクリアされる() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $helper = new SC_Helper_Purchase();
- $helper->clearShipmentItemTemp('00001');
-
- $this->expected = array('00001'=>null, '00002'=>array('商品2'), '00003'=>array());
- $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
- $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
- $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
-
- $this->verify('配送商品');
- }
-
- public function testClearShipmentItem_存在しないIDを指定した場合_何も変更されない() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $helper = new SC_Helper_Purchase();
- $helper->clearShipmentItemTemp('00004');
-
- $this->expected = array('00001'=>array('商品1'), '00002'=>array('商品2'), '00003'=>array());
- $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
- $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
- $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
-
- $this->verify('配送商品');
- }
-
- public function testClearShipmentItem_商品情報が配列でない場合_何も変更されない() {
- $this->setUpShipping($this->getMultipleShipping());
- // 内容を配列でないように変更
- $_SESSION['shipping']['00001'] = 'temp';
-
- $helper = new SC_Helper_Purchase();
- $helper->clearShipmentItemTemp('00001');
-
- // '00001'は配列でないので全体を取得
- $this->expected = array('00001'=>'temp', '00002'=>array('商品2'), '00003'=>array());
- $this->actual['00001'] = $_SESSION['shipping']['00001'];
- $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
- $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
-
- $this->verify('配送商品');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_clearShipmentItemTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,79 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_clearShipmentItemTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testClearShipmentItem_配送先ID未指定の場合_全ての配送商品がクリアされる() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $helper = new SC_Helper_Purchase();
+ $helper->clearShipmentItemTemp(); // default:null
+
+ $this->expected = array('00001'=>null, '00002'=>null, '00003'=>null);
+ $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
+ $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
+ $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
+
+ $this->verify('配送商品');
+ }
+
+ public function testClearShipmentItem_配送先ID指定の場合_指定したIDの配送商品がクリアされる() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $helper = new SC_Helper_Purchase();
+ $helper->clearShipmentItemTemp('00001');
+
+ $this->expected = array('00001'=>null, '00002'=>array('商品2'), '00003'=>array());
+ $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
+ $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
+ $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
+
+ $this->verify('配送商品');
+ }
+
+ public function testClearShipmentItem_存在しないIDを指定した場合_何も変更されない() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $helper = new SC_Helper_Purchase();
+ $helper->clearShipmentItemTemp('00004');
+
+ $this->expected = array('00001'=>array('商品1'), '00002'=>array('商品2'), '00003'=>array());
+ $this->actual['00001'] = $_SESSION['shipping']['00001']['shipment_item'];
+ $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
+ $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
+
+ $this->verify('配送商品');
+ }
+
+ public function testClearShipmentItem_商品情報が配列でない場合_何も変更されない() {
+ $this->setUpShipping($this->getMultipleShipping());
+ // 内容を配列でないように変更
+ $_SESSION['shipping']['00001'] = 'temp';
+
+ $helper = new SC_Helper_Purchase();
+ $helper->clearShipmentItemTemp('00001');
+
+ // '00001'は配列でないので全体を取得
+ $this->expected = array('00001'=>'temp', '00002'=>array('商品2'), '00003'=>array());
+ $this->actual['00001'] = $_SESSION['shipping']['00001'];
+ $this->actual['00002'] = $_SESSION['shipping']['00002']['shipment_item'];
+ $this->actual['00003'] = $_SESSION['shipping']['00003']['shipment_item'];
+
+ $this->verify('配送商品');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,165 +0,0 @@
-<?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::copyFromCustomer()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_copyFromCustomerTest extends SC_Helper_Purchase_TestBase {
-
- var $customer;
- var $customer_array;
-
- protected function setUp() {
- parent::setUp();
- $this->customer = new SC_Customer();
- $this->customer->setValue('customer_id', '1001');
- $this->customer->setValue('name01', '姓01');
- $this->customer->setValue('name02', '名01');
- $this->customer->setValue('kana01', 'セイ01');
- $this->customer->setValue('kana02', 'メイ01');
- $this->customer->setValue('sex', '1');
- $this->customer->setValue('zip01', '123');
- $this->customer->setValue('zip02', '4567');
- $this->customer->setValue('pref', '東京都');
- $this->customer->setValue('addr01', 'abc市');
- $this->customer->setValue('addr02', 'def町');
- $this->customer->setValue('tel01', '01');
- $this->customer->setValue('tel02', '234');
- $this->customer->setValue('tel03', '5678');
- $this->customer->setValue('fax01', '02');
- $this->customer->setValue('fax02', '345');
- $this->customer->setValue('fax03', '6789');
- $this->customer->setValue('job', '会社員');
- $this->customer->setValue('birth', '2012-01-01');
- $this->customer->setValue('email', 'test @ example.com');
-
- $this->customer_array = array('customer_id' => '1001', 'email' => 'test @ example.com');
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testCopyFromCustomer_ログインしていない場合_何もしない() {
- $dest = array();
- User_Utils::setLoginState(FALSE, $this->customer_array, $this->objQuery);
-
- $this->expected = array();
- $helper = new SC_Helper_Purchase();
- $helper->copyFromCustomer($dest, $this->customer);
- $this->actual = $dest;
-
- $this->verify();
- }
-
- public function testCopyFromCustomer_モバイルの場合_モバイルのメールアドレスを設定する() {
- $dest = array();
- User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
- User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
- $this->customer->setValue('email_mobile', 'mobile @ example.com');
-
- $this->expected = array(
- 'order_name01' => '姓01',
- 'order_name02' => '名01',
- 'order_kana01' => 'セイ01',
- 'order_kana02' => 'メイ01',
- 'order_sex' => '1',
- 'order_zip01' => '123',
- 'order_zip02' => '4567',
- 'order_pref' => '東京都',
- 'order_addr01' => 'abc市',
- 'order_addr02' => 'def町',
- 'order_tel01' => '01',
- 'order_tel02' => '234',
- 'order_tel03' => '5678',
- 'order_fax01' => '02',
- 'order_fax02' => '345',
- 'order_fax03' => '6789',
- 'order_job' => '会社員',
- 'order_birth' => '2012-01-01',
- 'order_email' => 'mobile @ example.com',
- 'customer_id' => '1001',
- 'update_date' => 'CURRENT_TIMESTAMP'
- );
- $helper = new SC_Helper_Purchase();
- $helper->copyFromCustomer($dest, $this->customer);
- $this->actual = $dest;
-
- $this->verify();
- }
-
- public function testCopyFromCustomer_モバイルかつモバイルのメールアドレスがない場合_通常のメールアドレスを設定する() {
- $dest = array();
- $prefix = 'order';
- // キーを絞る
- $keys = array('name01', 'email');
- User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
- User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
-
- $this->expected = array(
- 'order_name01' => '姓01',
- 'order_email' => 'test @ example.com',
- 'customer_id' => '1001',
- 'update_date' => 'CURRENT_TIMESTAMP'
- );
- $helper = new SC_Helper_Purchase();
- $helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
- $this->actual = $dest;
-
- $this->verify();
- }
-
- public function testCopyFromCustomer_モバイルでない場合_通常のメールアドレスをそのまま設定する() {
- $dest = array();
- $prefix = 'prefix';
- // キーを絞る
- $keys = array('name01', 'email');
- User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
- User_Utils::setDeviceType(DEVICE_TYPE_PC);
- $this->customer->setValue('email_mobile', 'mobile @ example.com');
-
- $this->expected = array(
- 'prefix_name01' => '姓01',
- 'prefix_email' => 'test @ example.com',
- 'customer_id' => '1001',
- 'update_date' => 'CURRENT_TIMESTAMP'
- );
- $helper = new SC_Helper_Purchase();
- $helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
- $this->actual = $dest;
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromCustomerTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,165 @@
+<?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::copyFromCustomer()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_copyFromCustomerTest extends SC_Helper_Purchase_TestBase {
+
+ var $customer;
+ var $customer_array;
+
+ protected function setUp() {
+ parent::setUp();
+ $this->customer = new SC_Customer();
+ $this->customer->setValue('customer_id', '1001');
+ $this->customer->setValue('name01', '姓01');
+ $this->customer->setValue('name02', '名01');
+ $this->customer->setValue('kana01', 'セイ01');
+ $this->customer->setValue('kana02', 'メイ01');
+ $this->customer->setValue('sex', '1');
+ $this->customer->setValue('zip01', '123');
+ $this->customer->setValue('zip02', '4567');
+ $this->customer->setValue('pref', '東京都');
+ $this->customer->setValue('addr01', 'abc市');
+ $this->customer->setValue('addr02', 'def町');
+ $this->customer->setValue('tel01', '01');
+ $this->customer->setValue('tel02', '234');
+ $this->customer->setValue('tel03', '5678');
+ $this->customer->setValue('fax01', '02');
+ $this->customer->setValue('fax02', '345');
+ $this->customer->setValue('fax03', '6789');
+ $this->customer->setValue('job', '会社員');
+ $this->customer->setValue('birth', '2012-01-01');
+ $this->customer->setValue('email', 'test @ example.com');
+
+ $this->customer_array = array('customer_id' => '1001', 'email' => 'test @ example.com');
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testCopyFromCustomer_ログインしていない場合_何もしない() {
+ $dest = array();
+ User_Utils::setLoginState(FALSE, $this->customer_array, $this->objQuery);
+
+ $this->expected = array();
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromCustomer($dest, $this->customer);
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+
+ public function testCopyFromCustomer_モバイルの場合_モバイルのメールアドレスを設定する() {
+ $dest = array();
+ User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
+ User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
+ $this->customer->setValue('email_mobile', 'mobile @ example.com');
+
+ $this->expected = array(
+ 'order_name01' => '姓01',
+ 'order_name02' => '名01',
+ 'order_kana01' => 'セイ01',
+ 'order_kana02' => 'メイ01',
+ 'order_sex' => '1',
+ 'order_zip01' => '123',
+ 'order_zip02' => '4567',
+ 'order_pref' => '東京都',
+ 'order_addr01' => 'abc市',
+ 'order_addr02' => 'def町',
+ 'order_tel01' => '01',
+ 'order_tel02' => '234',
+ 'order_tel03' => '5678',
+ 'order_fax01' => '02',
+ 'order_fax02' => '345',
+ 'order_fax03' => '6789',
+ 'order_job' => '会社員',
+ 'order_birth' => '2012-01-01',
+ 'order_email' => 'mobile @ example.com',
+ 'customer_id' => '1001',
+ 'update_date' => 'CURRENT_TIMESTAMP'
+ );
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromCustomer($dest, $this->customer);
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+
+ public function testCopyFromCustomer_モバイルかつモバイルのメールアドレスがない場合_通常のメールアドレスを設定する() {
+ $dest = array();
+ $prefix = 'order';
+ // キーを絞る
+ $keys = array('name01', 'email');
+ User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
+ User_Utils::setDeviceType(DEVICE_TYPE_MOBILE);
+
+ $this->expected = array(
+ 'order_name01' => '姓01',
+ 'order_email' => 'test @ example.com',
+ 'customer_id' => '1001',
+ 'update_date' => 'CURRENT_TIMESTAMP'
+ );
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+
+ public function testCopyFromCustomer_モバイルでない場合_通常のメールアドレスをそのまま設定する() {
+ $dest = array();
+ $prefix = 'prefix';
+ // キーを絞る
+ $keys = array('name01', 'email');
+ User_Utils::setLoginState(TRUE, $this->customer_array, $this->objQuery);
+ User_Utils::setDeviceType(DEVICE_TYPE_PC);
+ $this->customer->setValue('email_mobile', 'mobile @ example.com');
+
+ $this->expected = array(
+ 'prefix_name01' => '姓01',
+ 'prefix_email' => 'test @ example.com',
+ 'customer_id' => '1001',
+ 'update_date' => 'CURRENT_TIMESTAMP'
+ );
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromCustomer($dest, $this->customer, $prefix, $keys);
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,113 +0,0 @@
-<?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::copyFromOrder()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_copyFromOrderTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testCopyFromOrder_すべてデフォルト設定にした場合_デフォルトの接頭辞・キーでコピーされる() {
- $dest = array();
- $src = array(
- 'order_name01' => '姓',
- 'order_name02' => '名',
- 'order_kana01' => 'セイ',
- 'order_kana02' => 'メイ',
- 'order_sex' => '1',
- 'order_zip01' => '012',
- 'order_zip02' => '1234',
- 'order_pref' => '北海道',
- 'order_addr01' => '住所01',
- 'order_addr02' => '住所02',
- 'order_tel01' => '01',
- 'order_tel02' => '1234',
- 'order_tel03' => '5678',
- 'order_fax01' => '02',
- 'order_fax02' => '2345',
- 'order_fax03' => '6789'
- );
-
- $this->expected = array(
- 'shipping_name01' => '姓',
- 'shipping_name02' => '名',
- 'shipping_kana01' => 'セイ',
- 'shipping_kana02' => 'メイ',
- 'shipping_sex' => '1',
- 'shipping_zip01' => '012',
- 'shipping_zip02' => '1234',
- 'shipping_pref' => '北海道',
- 'shipping_addr01' => '住所01',
- 'shipping_addr02' => '住所02',
- 'shipping_tel01' => '01',
- 'shipping_tel02' => '1234',
- 'shipping_tel03' => '5678',
- 'shipping_fax01' => '02',
- 'shipping_fax02' => '2345',
- 'shipping_fax03' => '6789'
- );
- $helper = new SC_Helper_Purchase();
- $helper->copyFromOrder($dest, $src);
- $this->actual = $dest;
-
- $this->verify();
- }
-
- public function testCopyFromOrder_接頭辞・キーを設定した場合_指定の値でコピーされる() {
- $dest = array();
- $src = array(
- 'input_name01' => '姓',
- 'input_name02' => '名',
- 'input_zip01' => '012' // キーに含まれないもの
- );
-
- $this->expected = array(
- 'output_name01' => '姓',
- 'output_name02' => '名'
- );
- $helper = new SC_Helper_Purchase();
- $helper->copyFromOrder($dest, $src, 'output', 'input', array('name01', 'name02'));
- $this->actual = $dest;
-
- $this->verify();
- }
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_copyFromOrderTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,113 @@
+<?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::copyFromOrder()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_copyFromOrderTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testCopyFromOrder_すべてデフォルト設定にした場合_デフォルトの接頭辞・キーでコピーされる() {
+ $dest = array();
+ $src = array(
+ 'order_name01' => '姓',
+ 'order_name02' => '名',
+ 'order_kana01' => 'セイ',
+ 'order_kana02' => 'メイ',
+ 'order_sex' => '1',
+ 'order_zip01' => '012',
+ 'order_zip02' => '1234',
+ 'order_pref' => '北海道',
+ 'order_addr01' => '住所01',
+ 'order_addr02' => '住所02',
+ 'order_tel01' => '01',
+ 'order_tel02' => '1234',
+ 'order_tel03' => '5678',
+ 'order_fax01' => '02',
+ 'order_fax02' => '2345',
+ 'order_fax03' => '6789'
+ );
+
+ $this->expected = array(
+ 'shipping_name01' => '姓',
+ 'shipping_name02' => '名',
+ 'shipping_kana01' => 'セイ',
+ 'shipping_kana02' => 'メイ',
+ 'shipping_sex' => '1',
+ 'shipping_zip01' => '012',
+ 'shipping_zip02' => '1234',
+ 'shipping_pref' => '北海道',
+ 'shipping_addr01' => '住所01',
+ 'shipping_addr02' => '住所02',
+ 'shipping_tel01' => '01',
+ 'shipping_tel02' => '1234',
+ 'shipping_tel03' => '5678',
+ 'shipping_fax01' => '02',
+ 'shipping_fax02' => '2345',
+ 'shipping_fax03' => '6789'
+ );
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromOrder($dest, $src);
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+
+ public function testCopyFromOrder_接頭辞・キーを設定した場合_指定の値でコピーされる() {
+ $dest = array();
+ $src = array(
+ 'input_name01' => '姓',
+ 'input_name02' => '名',
+ 'input_zip01' => '012' // キーに含まれないもの
+ );
+
+ $this->expected = array(
+ 'output_name01' => '姓',
+ 'output_name02' => '名'
+ );
+ $helper = new SC_Helper_Purchase();
+ $helper->copyFromOrder($dest, $src, 'output', 'input', array('name01', 'name02'));
+ $this->actual = $dest;
+
+ $this->verify();
+ }
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,87 +0,0 @@
-<?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::getDeliv()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getDelivTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpDeliv();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetDeliv_存在しない商品種別IDを指定した場合_結果が空になる() {
- $product_type_id = '9999'; // 存在しないID
-
- $this->expected = array();
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getDeliv($product_type_id);
-
- $this->verify('配送業者');
- }
-
- public function testGetDeliv_存在する商品種別IDを指定した場合_結果が正しい順序で取得できる() {
- $product_type_id = '1001';
-
- $this->expected['count'] = 2;
- $this->expected['first'] = array(
- 'deliv_id' => '1002',
- 'product_type_id' => '1001',
- 'name' => '配送業者02',
- 'rank' => '3'
- );
- $this->expected['second'] = array(
- 'deliv_id' => '1001',
- 'product_type_id' => '1001',
- 'name' => '配送業者01',
- 'rank' => '2'
- );
-
- $helper = new SC_Helper_Purchase();
- $result = $helper->getDeliv($product_type_id);
- $this->actual['count'] = count($result);
- $cols = array('deliv_id', 'product_type_id', 'name', 'rank');
- $this->actual['first'] = Test_Utils::mapArray($result[0], $cols);
- $this->actual['second'] = Test_Utils::mapArray($result[1], $cols);
-
- $this->verify('配送業者');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,87 @@
+<?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::getDeliv()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getDelivTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpDeliv();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetDeliv_存在しない商品種別IDを指定した場合_結果が空になる() {
+ $product_type_id = '9999'; // 存在しないID
+
+ $this->expected = array();
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getDeliv($product_type_id);
+
+ $this->verify('配送業者');
+ }
+
+ public function testGetDeliv_存在する商品種別IDを指定した場合_結果が正しい順序で取得できる() {
+ $product_type_id = '1001';
+
+ $this->expected['count'] = 2;
+ $this->expected['first'] = array(
+ 'deliv_id' => '1002',
+ 'product_type_id' => '1001',
+ 'name' => '配送業者02',
+ 'rank' => '3'
+ );
+ $this->expected['second'] = array(
+ 'deliv_id' => '1001',
+ 'product_type_id' => '1001',
+ 'name' => '配送業者01',
+ 'rank' => '2'
+ );
+
+ $helper = new SC_Helper_Purchase();
+ $result = $helper->getDeliv($product_type_id);
+ $this->actual['count'] = count($result);
+ $cols = array('deliv_id', 'product_type_id', 'name', 'rank');
+ $this->actual['first'] = Test_Utils::mapArray($result[0], $cols);
+ $this->actual['second'] = Test_Utils::mapArray($result[1], $cols);
+
+ $this->verify('配送業者');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,74 +0,0 @@
-<?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::getDelivTime()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getDelivTimeTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpDelivTime();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetDelivTime_存在しない配送業者IDを指定した場合_結果が空になる() {
- $deliv_id = '100'; // 存在しないID
-
- $this->expected = array();
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getDelivTime($deliv_id);
-
- $this->verify('お届け時間');
- }
-
- public function testGetDelivTime_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
- $deliv_id = '1001';
-
- $this->expected = array(
- '1' => '午前',
- '2' => '午後'
- );
-
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getDelivTime($deliv_id);
-
- $this->verify('お届け時間');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,74 @@
+<?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::getDelivTime()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getDelivTimeTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpDelivTime();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetDelivTime_存在しない配送業者IDを指定した場合_結果が空になる() {
+ $deliv_id = '100'; // 存在しないID
+
+ $this->expected = array();
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getDelivTime($deliv_id);
+
+ $this->verify('お届け時間');
+ }
+
+ public function testGetDelivTime_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
+ $deliv_id = '1001';
+
+ $this->expected = array(
+ '1' => '午前',
+ '2' => '午後'
+ );
+
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getDelivTime($deliv_id);
+
+ $this->verify('お届け時間');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,145 +0,0 @@
-<?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::getOrderDetail()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getOrderDetailTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpOrder();
- $this->setUpOrderDetail();
- $this->setUpProductClass();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetOrderDetail_存在しない受注IDを指定した場合_結果が空になる() {
- $order_id = '9999';
-
- $this->expected = array();
- $this->actual = SC_Helper_Purchase::getOrderDetail($order_id);
-
- $this->verify();
- }
-
- public function testGetOrderDetail_存在する受注IDを指定した場合_対応する受注詳細情報が取得できる() {
- $order_id = '1001';
-
- $this->expected = array(
- array(
- 'product_id' => '1002',
- 'product_class_id' => '1002',
- 'product_type_id' => '1002',
- 'product_code' => 'pc1002',
- 'product_name' => '製品名1002',
- 'classcategory_name1' => 'cat10021',
- 'classcategory_name2' => 'cat10022',
- 'price' => '3000',
- 'quantity' => '10',
- 'point_rate' => '5',
- 'status' => '3',
- 'payment_date' => '2032-12-31 01:20:30',
- 'enable' => '0',
- 'effective' => '1'
- ),
- array(
- 'product_id' => '1001',
- 'product_class_id' => '1001',
- 'product_type_id' => '1001',
- 'product_code' => 'pc1001',
- 'product_name' => '製品名1001',
- 'classcategory_name1' => 'cat10011',
- 'classcategory_name2' => 'cat10012',
- 'price' => '4000',
- 'quantity' => '15',
- 'point_rate' => '6',
- 'status' => '3',
- 'payment_date' => '2032-12-31 01:20:30',
- 'enable' => '1',
- 'effective' => '1'
- )
- );
- $this->actual = SC_Helper_Purchase::getOrderDetail($order_id);
-
- $this->verify();
- }
-
- public function testGetOrderDetail_ステータス取得フラグがOFFのの場合_ステータス以外の情報が取得できる() {
- $order_id = '1001';
-
- $this->expected = array(
- array(
- 'product_id' => '1002',
- 'product_class_id' => '1002',
- 'product_type_id' => '1002',
- 'product_code' => 'pc1002',
- 'product_name' => '製品名1002',
- 'classcategory_name1' => 'cat10021',
- 'classcategory_name2' => 'cat10022',
- 'price' => '3000',
- 'quantity' => '10',
- 'point_rate' => '5',
- // 'status' => '3',
- // 'payment_date' => '2032-12-31 01:20:30',
- 'enable' => '0',
- 'effective' => '1'
- ),
- array(
- 'product_id' => '1001',
- 'product_class_id' => '1001',
- 'product_type_id' => '1001',
- 'product_code' => 'pc1001',
- 'product_name' => '製品名1001',
- 'classcategory_name1' => 'cat10011',
- 'classcategory_name2' => 'cat10012',
- 'price' => '4000',
- 'quantity' => '15',
- 'point_rate' => '6',
- // 'status' => '3',
- // 'payment_date' => '2032-12-31 01:20:30',
- 'enable' => '1',
- 'effective' => '1'
- )
- );
- $this->actual = SC_Helper_Purchase::getOrderDetail($order_id, false);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderDetailTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,145 @@
+<?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::getOrderDetail()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getOrderDetailTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpOrder();
+ $this->setUpOrderDetail();
+ $this->setUpProductClass();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetOrderDetail_存在しない受注IDを指定した場合_結果が空になる() {
+ $order_id = '9999';
+
+ $this->expected = array();
+ $this->actual = SC_Helper_Purchase::getOrderDetail($order_id);
+
+ $this->verify();
+ }
+
+ public function testGetOrderDetail_存在する受注IDを指定した場合_対応する受注詳細情報が取得できる() {
+ $order_id = '1001';
+
+ $this->expected = array(
+ array(
+ 'product_id' => '1002',
+ 'product_class_id' => '1002',
+ 'product_type_id' => '1002',
+ 'product_code' => 'pc1002',
+ 'product_name' => '製品名1002',
+ 'classcategory_name1' => 'cat10021',
+ 'classcategory_name2' => 'cat10022',
+ 'price' => '3000',
+ 'quantity' => '10',
+ 'point_rate' => '5',
+ 'status' => '3',
+ 'payment_date' => '2032-12-31 01:20:30',
+ 'enable' => '0',
+ 'effective' => '1'
+ ),
+ array(
+ 'product_id' => '1001',
+ 'product_class_id' => '1001',
+ 'product_type_id' => '1001',
+ 'product_code' => 'pc1001',
+ 'product_name' => '製品名1001',
+ 'classcategory_name1' => 'cat10011',
+ 'classcategory_name2' => 'cat10012',
+ 'price' => '4000',
+ 'quantity' => '15',
+ 'point_rate' => '6',
+ 'status' => '3',
+ 'payment_date' => '2032-12-31 01:20:30',
+ 'enable' => '1',
+ 'effective' => '1'
+ )
+ );
+ $this->actual = SC_Helper_Purchase::getOrderDetail($order_id);
+
+ $this->verify();
+ }
+
+ public function testGetOrderDetail_ステータス取得フラグがOFFのの場合_ステータス以外の情報が取得できる() {
+ $order_id = '1001';
+
+ $this->expected = array(
+ array(
+ 'product_id' => '1002',
+ 'product_class_id' => '1002',
+ 'product_type_id' => '1002',
+ 'product_code' => 'pc1002',
+ 'product_name' => '製品名1002',
+ 'classcategory_name1' => 'cat10021',
+ 'classcategory_name2' => 'cat10022',
+ 'price' => '3000',
+ 'quantity' => '10',
+ 'point_rate' => '5',
+ // 'status' => '3',
+ // 'payment_date' => '2032-12-31 01:20:30',
+ 'enable' => '0',
+ 'effective' => '1'
+ ),
+ array(
+ 'product_id' => '1001',
+ 'product_class_id' => '1001',
+ 'product_type_id' => '1001',
+ 'product_code' => 'pc1001',
+ 'product_name' => '製品名1001',
+ 'classcategory_name1' => 'cat10011',
+ 'classcategory_name2' => 'cat10012',
+ 'price' => '4000',
+ 'quantity' => '15',
+ 'point_rate' => '6',
+ // 'status' => '3',
+ // 'payment_date' => '2032-12-31 01:20:30',
+ 'enable' => '1',
+ 'effective' => '1'
+ )
+ );
+ $this->actual = SC_Helper_Purchase::getOrderDetail($order_id, false);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,73 +0,0 @@
-<?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::getOrderTemp()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getOrderTempTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpOrderTemp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetOrderTemp_存在しない受注IDを指定した場合_結果が空になる() {
- $order_id = '9999';
-
- $this->expected = null;
- $this->actual = SC_Helper_Purchase::getOrderTemp($order_id);
-
- $this->verify();
- }
-
- public function testGetOrderTemp_存在する受注IDを指定した場合_対応する結果が取得できる() {
- $order_temp_id = '1002';
-
- $this->expected = array(
- 'order_temp_id' => '1002',
- 'customer_id' => '1002',
- 'order_name01' => '受注情報02'
- );
- $result = SC_Helper_Purchase::getOrderTemp($order_temp_id);
- $this->actual = Test_Utils::mapArray($result, array('order_temp_id', 'customer_id', 'order_name01'));
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,73 @@
+<?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::getOrderTemp()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getOrderTempTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpOrderTemp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetOrderTemp_存在しない受注IDを指定した場合_結果が空になる() {
+ $order_id = '9999';
+
+ $this->expected = null;
+ $this->actual = SC_Helper_Purchase::getOrderTemp($order_id);
+
+ $this->verify();
+ }
+
+ public function testGetOrderTemp_存在する受注IDを指定した場合_対応する結果が取得できる() {
+ $order_temp_id = '1002';
+
+ $this->expected = array(
+ 'order_temp_id' => '1002',
+ 'customer_id' => '1002',
+ 'order_name01' => '受注情報02'
+ );
+ $result = SC_Helper_Purchase::getOrderTemp($order_temp_id);
+ $this->actual = Test_Utils::mapArray($result, array('order_temp_id', 'customer_id', 'order_name01'));
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,98 +0,0 @@
-<?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::getOrder()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getOrderTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpOrder();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetOrder_存在しない受注IDを指定した場合_結果が空になる() {
- $order_id = '9999';
-
- $this->expected = null;
- $this->actual = SC_Helper_Purchase::getOrder($order_id);
-
- $this->verify();
- }
-
- public function testGetOrder_存在しない顧客IDを指定した場合_結果が空になる() {
- $order_id = '1002';
- $customer_id = '9999';
-
- $this->expected = null;
- $this->actual = SC_Helper_Purchase::getOrder($order_id, $customer_id);
-
- $this->verify();
- }
-
- public function testGetOrder_顧客IDを指定しなかった場合_受注IDに対応する結果が取得できる() {
- $order_id = '1002';
-
- $this->expected = array(
- 'order_id' => '1002',
- 'customer_id' => '1002',
- 'order_name01' => '受注情報02'
- );
- $result = SC_Helper_Purchase::getOrder($order_id);
- $this->actual = Test_Utils::mapArray($result, array('order_id', 'customer_id', 'order_name01'));
-
- $this->verify();
- }
-
- public function testGetOrder_存在する顧客IDを指定した場合_対応する結果が取得できる() {
- $order_id = '1002';
- $customer_id = '1002';
-
- $this->expected = array(
- 'order_id' => '1002',
- 'customer_id' => '1002',
- 'order_name01' => '受注情報02'
- );
- $result = SC_Helper_Purchase::getOrder($order_id, $customer_id);
- $this->actual = Test_Utils::mapArray($result, array('order_id', 'customer_id', 'order_name01'));
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getOrderTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,98 @@
+<?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::getOrder()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getOrderTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpOrder();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetOrder_存在しない受注IDを指定した場合_結果が空になる() {
+ $order_id = '9999';
+
+ $this->expected = null;
+ $this->actual = SC_Helper_Purchase::getOrder($order_id);
+
+ $this->verify();
+ }
+
+ public function testGetOrder_存在しない顧客IDを指定した場合_結果が空になる() {
+ $order_id = '1002';
+ $customer_id = '9999';
+
+ $this->expected = null;
+ $this->actual = SC_Helper_Purchase::getOrder($order_id, $customer_id);
+
+ $this->verify();
+ }
+
+ public function testGetOrder_顧客IDを指定しなかった場合_受注IDに対応する結果が取得できる() {
+ $order_id = '1002';
+
+ $this->expected = array(
+ 'order_id' => '1002',
+ 'customer_id' => '1002',
+ 'order_name01' => '受注情報02'
+ );
+ $result = SC_Helper_Purchase::getOrder($order_id);
+ $this->actual = Test_Utils::mapArray($result, array('order_id', 'customer_id', 'order_name01'));
+
+ $this->verify();
+ }
+
+ public function testGetOrder_存在する顧客IDを指定した場合_対応する結果が取得できる() {
+ $order_id = '1002';
+ $customer_id = '1002';
+
+ $this->expected = array(
+ 'order_id' => '1002',
+ 'customer_id' => '1002',
+ 'order_name01' => '受注情報02'
+ );
+ $result = SC_Helper_Purchase::getOrder($order_id, $customer_id);
+ $this->actual = Test_Utils::mapArray($result, array('order_id', 'customer_id', 'order_name01'));
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,85 +0,0 @@
-<?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::getPaymentsByPaymentsId()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getPaymentsByPaymentsIdTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpPayment();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetPaymentsByPaymentsId_存在しない支払IDを指定した場合_結果が空になる() {
- $payment_id = '9999'; // 存在しないID
-
- $this->expected = null;
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
-
- $this->verify('支払方法');
- }
-
- public function testGetPaymentsByPaymentsId_存在する支払IDを指定した場合_対応する支払方法の情報が取得できる() {
- $payment_id = '1001';
-
- $this->expected = array(
- 'payment_id' => '1001',
- 'payment_method' => '支払方法1001'
- );
-
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
- $this->actual = Test_Utils::mapArray($this->actual, array('payment_id', 'payment_method'));
-
- $this->verify('支払方法');
- }
-
- public function testGetPaymentsByPaymentsId_削除されている支払IDを指定した場合_結果が空になる() {
- $payment_id = '1002'; // 削除済みのID
-
- $this->expected = null;
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
-
- $this->verify('支払方法');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPaymentsIdTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,85 @@
+<?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::getPaymentsByPaymentsId()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getPaymentsByPaymentsIdTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpPayment();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetPaymentsByPaymentsId_存在しない支払IDを指定した場合_結果が空になる() {
+ $payment_id = '9999'; // 存在しないID
+
+ $this->expected = null;
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
+
+ $this->verify('支払方法');
+ }
+
+ public function testGetPaymentsByPaymentsId_存在する支払IDを指定した場合_対応する支払方法の情報が取得できる() {
+ $payment_id = '1001';
+
+ $this->expected = array(
+ 'payment_id' => '1001',
+ 'payment_method' => '支払方法1001'
+ );
+
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
+ $this->actual = Test_Utils::mapArray($this->actual, array('payment_id', 'payment_method'));
+
+ $this->verify('支払方法');
+ }
+
+ public function testGetPaymentsByPaymentsId_削除されている支払IDを指定した場合_結果が空になる() {
+ $payment_id = '1002'; // 削除済みのID
+
+ $this->expected = null;
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getPaymentsByPaymentsId($payment_id);
+
+ $this->verify('支払方法');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,116 +0,0 @@
-<?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::getPaymentsByPrice()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getPaymentsByPriceTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpPayment();
- $this->setUpPaymentOptions();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetPaymentsByPrice_購入金額がすべての上限を上回る場合_上限の設定がないものだけ取得できる() {
- $deliv_id = '1003';
- $total = 21001;
- $helper = new SC_Helper_Purchase();
-
- $this->expected['count'] = 2;
- $this->expected['first'] = array(
- 'payment_id' => '3002',
- 'payment_method' => '支払方法3002',
- 'rule_max' => null,
- 'upper_rule' => null,
- 'note' => null,
- 'payment_image' => null,
- 'charge' => null
- );
- $this->expected['second_id'] = '3003';
-
- $result = $helper->getPaymentsByPrice($total, $deliv_id);
- $this->actual['count'] = count($result);
- $this->actual['first'] = $result[0];
- $this->actual['second_id'] = $result[1]['payment_id'];
-
- $this->verify();
- }
-
- public function testGetPaymentsByPrice_購入金額が一部の上限を上回る場合_上限に引っかからないものだけ取得できる() {
- $deliv_id = '1003';
- $total = 20500;
- $helper = new SC_Helper_Purchase();
-
- $this->expected = array('3002', '3003', '3005');
-
- $result = $helper->getPaymentsByPrice($total, $deliv_id);
- $this->actual = Test_Utils::mapCols($result, 'payment_id');
-
- $this->verify();
- }
-
- public function testGetPaymentsByPrice_購入金額が一部の下限を下回る場合_下限に引っかからないものだけ取得できる() {
- $deliv_id = '1003';
- $total = 11000;
- $helper = new SC_Helper_Purchase();
-
- $this->expected = array('3002', '3003', '3004');
-
- $result = $helper->getPaymentsByPrice($total, $deliv_id);
- $this->actual = Test_Utils::mapCols($result, 'payment_id');
-
- $this->verify();
- }
-
- public function testGetPaymentsByPrice_購入金額がすべての下限を下回る場合_下限の設定がないものだけ取得できる() {
- $deliv_id = '1003';
- $total = 9999;
- $helper = new SC_Helper_Purchase();
-
- $this->expected = array('3002', '3004');
-
- $result = $helper->getPaymentsByPrice($total, $deliv_id);
- $this->actual = Test_Utils::mapCols($result, 'payment_id');
-
- $this->verify();
- }
-
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsByPriceTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,116 @@
+<?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::getPaymentsByPrice()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getPaymentsByPriceTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpPayment();
+ $this->setUpPaymentOptions();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetPaymentsByPrice_購入金額がすべての上限を上回る場合_上限の設定がないものだけ取得できる() {
+ $deliv_id = '1003';
+ $total = 21001;
+ $helper = new SC_Helper_Purchase();
+
+ $this->expected['count'] = 2;
+ $this->expected['first'] = array(
+ 'payment_id' => '3002',
+ 'payment_method' => '支払方法3002',
+ 'rule_max' => null,
+ 'upper_rule' => null,
+ 'note' => null,
+ 'payment_image' => null,
+ 'charge' => null
+ );
+ $this->expected['second_id'] = '3003';
+
+ $result = $helper->getPaymentsByPrice($total, $deliv_id);
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = $result[0];
+ $this->actual['second_id'] = $result[1]['payment_id'];
+
+ $this->verify();
+ }
+
+ public function testGetPaymentsByPrice_購入金額が一部の上限を上回る場合_上限に引っかからないものだけ取得できる() {
+ $deliv_id = '1003';
+ $total = 20500;
+ $helper = new SC_Helper_Purchase();
+
+ $this->expected = array('3002', '3003', '3005');
+
+ $result = $helper->getPaymentsByPrice($total, $deliv_id);
+ $this->actual = Test_Utils::mapCols($result, 'payment_id');
+
+ $this->verify();
+ }
+
+ public function testGetPaymentsByPrice_購入金額が一部の下限を下回る場合_下限に引っかからないものだけ取得できる() {
+ $deliv_id = '1003';
+ $total = 11000;
+ $helper = new SC_Helper_Purchase();
+
+ $this->expected = array('3002', '3003', '3004');
+
+ $result = $helper->getPaymentsByPrice($total, $deliv_id);
+ $this->actual = Test_Utils::mapCols($result, 'payment_id');
+
+ $this->verify();
+ }
+
+ public function testGetPaymentsByPrice_購入金額がすべての下限を下回る場合_下限の設定がないものだけ取得できる() {
+ $deliv_id = '1003';
+ $total = 9999;
+ $helper = new SC_Helper_Purchase();
+
+ $this->expected = array('3002', '3004');
+
+ $result = $helper->getPaymentsByPrice($total, $deliv_id);
+ $this->actual = Test_Utils::mapCols($result, 'payment_id');
+
+ $this->verify();
+ }
+
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,71 +0,0 @@
-<?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::getPayments()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getPaymentsTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpPaymentOptions();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetPayments_存在しない配送業者IDを指定した場合_結果が空になる() {
- $deliv_id = '100'; // 存在しないID
-
- $this->expected = array();
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getPayments($deliv_id);
-
- $this->verify('支払方法');
- }
-
- public function testGetPayments_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
- $deliv_id = '1001';
-
- $this->expected = array('1002', '1001');
-
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getPayments($deliv_id);
-
- $this->verify('支払方法');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,71 @@
+<?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::getPayments()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getPaymentsTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpPaymentOptions();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetPayments_存在しない配送業者IDを指定した場合_結果が空になる() {
+ $deliv_id = '100'; // 存在しないID
+
+ $this->expected = array();
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getPayments($deliv_id);
+
+ $this->verify('支払方法');
+ }
+
+ public function testGetPayments_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
+ $deliv_id = '1001';
+
+ $this->expected = array('1002', '1001');
+
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getPayments($deliv_id);
+
+ $this->verify('支払方法');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,134 +0,0 @@
-<?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::getShipmentItems()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getShipmentItemsTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- $this->setUpShipmentItem();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetShipmentItems_存在しない受注IDを指定した場合_結果が空になる() {
- $order_id = '100'; // 存在しないID
- $shipping_id = '1';
-
- $this->expected = array();
- $this->actual = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
-
- $this->verify('配送情報');
- }
-
- public function testGetShipmentItems_存在しない配送先IDを指定した場合_結果が空になる() {
- $order_id = '1';
- $shipping_id = '100'; // 存在しないID
-
- $this->expected = array();
- $this->actual = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
-
- $this->verify('配送情報');
- }
-
- public function testGetShipmentItems_存在する受注IDと配送先IDを指定した場合_結果が取得できる() {
- $order_id = '1';
- $shipping_id = '1';
-
- $this->expected['count'] = 2;
- $this->expected['first'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'product_class_id' => '1001',
- 'product_name' => '商品名01',
- 'price' => '1500',
- 'productsClass' => array('product_class_id' => '1001', 'product_id' => '1001')
- );
- $this->expected['second'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'product_class_id' => '1002',
- 'product_name' => '商品名02',
- 'price' => '2400',
- 'productsClass' => array('product_class_id' => '1002', 'product_id' => '1002')
- );
-
- $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
- $this->actual['count'] = count($result);
- $this->actual['first'] = Test_Utils::mapArray($result[0], array(
- 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
- $this->actual['first']['productsClass'] = Test_Utils::mapArray($this->actual['first']['productsClass'], array('product_class_id', 'product_id'));
- $this->actual['second'] = Test_Utils::mapArray($result[1], array(
- 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
- $this->actual['second']['productsClass'] = Test_Utils::mapArray($this->actual['second']['productsClass'], array('product_class_id', 'product_id'));
- $this->verify('配送情報');
- }
-
- public function testGetShipmentItems_詳細フラグをOFFにした場合_結果に詳細情報が含まれない() {
- $order_id = '1';
- $shipping_id = '1';
-
- $this->expected['count'] = 2;
- $this->expected['first'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'product_class_id' => '1001',
- 'product_name' => '商品名01',
- 'price' => '1500',
- 'productsClass' => null
- );
- $this->expected['second'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'product_class_id' => '1002',
- 'product_name' => '商品名02',
- 'price' => '2400',
- 'productsClass' => null
- );
-
- $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id, false);
- $this->actual['count'] = count($result);
- $this->actual['first'] = Test_Utils::mapArray($result[0], array(
- 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
- $this->actual['second'] = Test_Utils::mapArray($result[1], array(
- 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
- $this->verify('配送情報');
-
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,134 @@
+<?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::getShipmentItems()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getShipmentItemsTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpShipmentItem();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetShipmentItems_存在しない受注IDを指定した場合_結果が空になる() {
+ $order_id = '100'; // 存在しないID
+ $shipping_id = '1';
+
+ $this->expected = array();
+ $this->actual = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
+
+ $this->verify('配送情報');
+ }
+
+ public function testGetShipmentItems_存在しない配送先IDを指定した場合_結果が空になる() {
+ $order_id = '1';
+ $shipping_id = '100'; // 存在しないID
+
+ $this->expected = array();
+ $this->actual = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
+
+ $this->verify('配送情報');
+ }
+
+ public function testGetShipmentItems_存在する受注IDと配送先IDを指定した場合_結果が取得できる() {
+ $order_id = '1';
+ $shipping_id = '1';
+
+ $this->expected['count'] = 2;
+ $this->expected['first'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'product_class_id' => '1001',
+ 'product_name' => '商品名01',
+ 'price' => '1500',
+ 'productsClass' => array('product_class_id' => '1001', 'product_id' => '1001')
+ );
+ $this->expected['second'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'product_class_id' => '1002',
+ 'product_name' => '商品名02',
+ 'price' => '2400',
+ 'productsClass' => array('product_class_id' => '1002', 'product_id' => '1002')
+ );
+
+ $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id);
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = Test_Utils::mapArray($result[0], array(
+ 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
+ $this->actual['first']['productsClass'] = Test_Utils::mapArray($this->actual['first']['productsClass'], array('product_class_id', 'product_id'));
+ $this->actual['second'] = Test_Utils::mapArray($result[1], array(
+ 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
+ $this->actual['second']['productsClass'] = Test_Utils::mapArray($this->actual['second']['productsClass'], array('product_class_id', 'product_id'));
+ $this->verify('配送情報');
+ }
+
+ public function testGetShipmentItems_詳細フラグをOFFにした場合_結果に詳細情報が含まれない() {
+ $order_id = '1';
+ $shipping_id = '1';
+
+ $this->expected['count'] = 2;
+ $this->expected['first'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'product_class_id' => '1001',
+ 'product_name' => '商品名01',
+ 'price' => '1500',
+ 'productsClass' => null
+ );
+ $this->expected['second'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'product_class_id' => '1002',
+ 'product_name' => '商品名02',
+ 'price' => '2400',
+ 'productsClass' => null
+ );
+
+ $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id, false);
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = Test_Utils::mapArray($result[0], array(
+ 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
+ $this->actual['second'] = Test_Utils::mapArray($result[1], array(
+ 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass'));
+ $this->verify('配送情報');
+
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,39 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_getShippingPrefTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- // TODO 要確認:引数の名前がおかしい(is_multipleではないはず)
- public function testGetShippingPref_保有フラグがOFFの場合_全配送情報を取得する() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $this->expected = array('東京都', '沖縄県', '埼玉県');
- $this->actual = SC_Helper_Purchase::getShippingPref();
-
- $this->verify('配送先の都道府県');
- }
-
- public function testGetShippingPref_保有フラグがONの場合_商品のある配送情報のみ取得する() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $this->expected = array('東京都', '沖縄県');
- $this->actual = SC_Helper_Purchase::getShippingPref(TRUE);
-
- $this->verify('配送先の都道府県');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingPrefTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,39 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_getShippingPrefTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ // TODO 要確認:引数の名前がおかしい(is_multipleではないはず)
+ public function testGetShippingPref_保有フラグがOFFの場合_全配送情報を取得する() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $this->expected = array('東京都', '沖縄県', '埼玉県');
+ $this->actual = SC_Helper_Purchase::getShippingPref();
+
+ $this->verify('配送先の都道府県');
+ }
+
+ public function testGetShippingPref_保有フラグがONの場合_商品のある配送情報のみ取得する() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $this->expected = array('東京都', '沖縄県');
+ $this->actual = SC_Helper_Purchase::getShippingPref(TRUE);
+
+ $this->verify('配送先の都道府県');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,47 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_getShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetShippingTemp_保有フラグがOFFの場合_セッション情報を取得する() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $this->expected = $this->getMultipleShipping();
- $this->actual = SC_Helper_Purchase::getShippingTemp();
-
- $this->verify('配送情報');
- }
-
- public function testGetShippingTemp_保有フラグがONの場合_商品のある情報のみ取得する() {
- $this->setUpShipping($this->getMultipleShipping());
-
- $this->expected = array(
- '00001' => array(
- 'shipment_id' => '00001',
- 'shipment_item' => array('商品1'),
- 'shipping_pref' => '東京都'),
- '00002' => array(
- 'shipment_id' => '00002',
- 'shipment_item' => array('商品2'),
- 'shipping_pref' => '沖縄県')
- );
- $this->actual = SC_Helper_Purchase::getShippingTemp(TRUE);
-
- $this->verify('配送情報');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,47 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_getShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetShippingTemp_保有フラグがOFFの場合_セッション情報を取得する() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $this->expected = $this->getMultipleShipping();
+ $this->actual = SC_Helper_Purchase::getShippingTemp();
+
+ $this->verify('配送情報');
+ }
+
+ public function testGetShippingTemp_保有フラグがONの場合_商品のある情報のみ取得する() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ $this->expected = array(
+ '00001' => array(
+ 'shipment_id' => '00001',
+ 'shipment_item' => array('商品1'),
+ 'shipping_pref' => '東京都'),
+ '00002' => array(
+ 'shipment_id' => '00002',
+ 'shipment_item' => array('商品2'),
+ 'shipping_pref' => '沖縄県')
+ );
+ $this->actual = SC_Helper_Purchase::getShippingTemp(TRUE);
+
+ $this->verify('配送情報');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,106 +0,0 @@
-<?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::getShippings()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getShippingsTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- parent::setUp();
- $this->setUpShipmentItem();
- $this->setUpShippingOnDb();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetShippings_存在しない受注IDを指定した場合_結果が空になる() {
- $order_id = '100'; // 存在しないID
-
- $this->expected = array();
- $helper = new SC_Helper_Purchase();
- $this->actual = $helper->getShippings($order_id);
-
- $this->verify('配送情報');
- }
-
- public function testGetShippings_存在する受注IDを指定した場合_結果が取得できる() {
- $order_id = '1';
-
- $this->expected['count'] = 1;
- $this->expected['first'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'shipping_name01' => '配送情報01',
- 'shipping_date' => '2012-01-12 00:00:00'
- );
- $this->expected['shipment_item_count'] = 2;
-
- $helper = new SC_Helper_Purchase();
- $result = $helper->getShippings($order_id);
- $this->actual['count'] = count($result);
- // shipping_idごとの配列になっているのでshipping_idで抽出
- $this->actual['first'] = Test_Utils::mapArray($result['1'], array(
- 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date'));
- $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);
- $this->verify('配送情報');
- }
-
- public function testGetShippings_商品取得フラグをOFFにした場合_結果に商品情報が含まれない() {
- $order_id = '1';
-
- $this->expected['count'] = 1;
- $this->expected['first'] = array(
- 'order_id' => '1',
- 'shipping_id' => '1',
- 'shipping_name01' => '配送情報01',
- 'shipping_date' => '2012-01-12 00:00:00'
- );
- $this->expected['shipment_item_count'] = 0;
-
- $helper = new SC_Helper_Purchase();
- $result = $helper->getShippings($order_id, false);
- $this->actual['count'] = count($result);
- // shipping_idごとの配列になっているのでshipping_idで抽出
- $this->actual['first'] = Test_Utils::mapArray($result['1'], array(
- 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date'));
- $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);
- $this->verify('配送情報');
-
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,106 @@
+<?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::getShippings()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_getShippingsTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpShipmentItem();
+ $this->setUpShippingOnDb();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetShippings_存在しない受注IDを指定した場合_結果が空になる() {
+ $order_id = '100'; // 存在しないID
+
+ $this->expected = array();
+ $helper = new SC_Helper_Purchase();
+ $this->actual = $helper->getShippings($order_id);
+
+ $this->verify('配送情報');
+ }
+
+ public function testGetShippings_存在する受注IDを指定した場合_結果が取得できる() {
+ $order_id = '1';
+
+ $this->expected['count'] = 1;
+ $this->expected['first'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'shipping_name01' => '配送情報01',
+ 'shipping_date' => '2012-01-12 00:00:00'
+ );
+ $this->expected['shipment_item_count'] = 2;
+
+ $helper = new SC_Helper_Purchase();
+ $result = $helper->getShippings($order_id);
+ $this->actual['count'] = count($result);
+ // shipping_idごとの配列になっているのでshipping_idで抽出
+ $this->actual['first'] = Test_Utils::mapArray($result['1'], array(
+ 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date'));
+ $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);
+ $this->verify('配送情報');
+ }
+
+ public function testGetShippings_商品取得フラグをOFFにした場合_結果に商品情報が含まれない() {
+ $order_id = '1';
+
+ $this->expected['count'] = 1;
+ $this->expected['first'] = array(
+ 'order_id' => '1',
+ 'shipping_id' => '1',
+ 'shipping_name01' => '配送情報01',
+ 'shipping_date' => '2012-01-12 00:00:00'
+ );
+ $this->expected['shipment_item_count'] = 0;
+
+ $helper = new SC_Helper_Purchase();
+ $result = $helper->getShippings($order_id, false);
+ $this->actual['count'] = count($result);
+ // shipping_idごとの配列になっているのでshipping_idで抽出
+ $this->actual['first'] = Test_Utils::mapArray($result['1'], array(
+ 'order_id', 'shipping_id', 'shipping_name01', 'shipping_date'));
+ $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);
+ $this->verify('配送情報');
+
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,69 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_isAddPointTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testIsAddPoint_新規注文の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_NEW);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_入金待ちの場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PAY_WAIT);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_入金済みの場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PRE_END);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_キャンセルの場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_CANCEL);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_取り寄せ中の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_BACK_ORDER);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_発送済みの場合_TRUEが返る() {
- $this->expected = TRUE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_DELIV);
-
- $this->verify('ポイント加算するかどうか');
- }
-
- public function testIsAddPoint_その他の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PENDING);
-
- $this->verify('ポイント加算するかどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isAddPointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,69 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_isAddPointTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testIsAddPoint_新規注文の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_NEW);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_入金待ちの場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PAY_WAIT);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_入金済みの場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PRE_END);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_キャンセルの場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_CANCEL);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_取り寄せ中の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_BACK_ORDER);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_発送済みの場合_TRUEが返る() {
+ $this->expected = TRUE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_DELIV);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+ public function testIsAddPoint_その他の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PENDING);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,42 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_isUsePointTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testIsUsePoint_ステータスがnullの場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isUsePoint(null);
-
- $this->verify('ポイントを使用するかどうか');
- }
-
- public function testIsUsePoint_ステータスがキャンセルの場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Helper_Purchase::isUsePoint(ORDER_CANCEL);
-
- $this->verify('ポイントを使用するかどうか');
- }
-
- // TODO 要確認:本当にキャンセルのとき以外はすべてTRUEで良いのか、現在の使われ方の都合か
- public function testIsUsePoint_ステータスがキャンセル以外の場合_TRUEが返る() {
- $this->expected = TRUE;
- $this->actual = SC_Helper_Purchase::isUsePoint(ORDER_NEW);
-
- $this->verify('ポイント加算するかどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_isUsePointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,42 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_isUsePointTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testIsUsePoint_ステータスがnullの場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isUsePoint(null);
+
+ $this->verify('ポイントを使用するかどうか');
+ }
+
+ public function testIsUsePoint_ステータスがキャンセルの場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Helper_Purchase::isUsePoint(ORDER_CANCEL);
+
+ $this->verify('ポイントを使用するかどうか');
+ }
+
+ // TODO 要確認:本当にキャンセルのとき以外はすべてTRUEで良いのか、現在の使われ方の都合か
+ public function testIsUsePoint_ステータスがキャンセル以外の場合_TRUEが返る() {
+ $this->expected = TRUE;
+ $this->actual = SC_Helper_Purchase::isUsePoint(ORDER_NEW);
+
+ $this->verify('ポイント加算するかどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,205 +0,0 @@
-<?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::registerShipmentItem()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_registerShipmentItemTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- $this->setUpShipmentItem();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testRegisterShipmentItem_製品クラスIDが入っていない場合_登録を行わない() {
- // 引数の設定
- $order_id = '1';
- $shipping_id = '1';
- $arrParams = array(
- array(
- // 'product_class_id' => '1',
- 'product_name' => '追加製品名01',
- 'product_code' => 'newcode01',
- 'classcategory_name1' => 'newcat01',
- 'classcategory_name2' => 'newcat02',
- 'price' => '2500'
- )
- );
-
- // 期待値の設定
- $this->expected['count'] = 0;
-
- // 対象functionの呼び出し
- SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
- $result = $this->objQuery->select(
- 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
- 'dtb_shipment_item',
- 'order_id = ? and shipping_id = ?',
- array($order_id, $shipping_id)
- );
- $this->actual['count'] = count($result);
-
- $this->verify('登録された配送商品情報');
- }
-
- public function testRegisterShipmentItem_製品名等が指定されている場合_指定された値で登録を行う() {
- // 引数の設定
- $order_id = '1';
- $shipping_id = '1';
- $arrParams = array(
- array(
- 'product_class_id' => '1',
- 'product_name' => '追加製品名01',
- 'product_code' => 'newcode01',
- 'classcategory_name1' => 'newcat01',
- 'classcategory_name2' => 'newcat02',
- 'price' => '2500'
- )
- );
-
- // 期待値の設定
- $this->expected['count'] = 1;
- $this->expected['first'] = array(
- 'product_class_id' => '1',
- 'product_name' => '追加製品名01',
- 'product_code' => 'newcode01',
- 'classcategory_name1' => 'newcat01',
- 'classcategory_name2' => 'newcat02',
- 'price' => '2500'
- );
-
- // 対象functionの呼び出し
- SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
- $result = $this->objQuery->select(
- 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
- 'dtb_shipment_item',
- 'order_id = ? and shipping_id = ?',
- array($order_id, $shipping_id)
- );
- $this->actual['count'] = count($result);
- $this->actual['first'] = $result[0];
-
- $this->verify('登録された配送商品情報');
- }
-
- public function testRegisterShipmentItem_製品名等が指定されていない場合_DBからマスタ情報を取得して登録を行う() {
- // 引数の設定
- $order_id = '1';
- $shipping_id = '1';
- $arrParams = array(
- array(
- 'product_class_id' => '1001'
- // 'product_name' => '追加製品名01',
- // 'product_code' => 'newcode01',
- // 'classcategory_name1' => 'newcat01',
- // 'classcategory_name2' => 'newcat02',
- // 'price' => '2500'
- )
- );
-
- // 期待値の設定
- $this->expected['count'] = 1;
- $this->expected['first'] = array(
- 'product_class_id' => '1001',
- 'product_name' => '製品名1001',
- 'product_code' => 'code1001',
- 'classcategory_name1' => 'cat1001',
- 'classcategory_name2' => 'cat1002',
- // TODO 要確認price01, price02を設定しても価格が取れない。実際にはDBから取るケースが無い?
- //'price' => '1500'
- 'price' => null
- );
-
- // 対象functionの呼び出し
- SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
- $result = $this->objQuery->select(
- 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
- 'dtb_shipment_item',
- 'order_id = ? and shipping_id = ?',
- array($order_id, $shipping_id)
- );
- $this->actual['count'] = count($result);
- $this->actual['first'] = $result[0];
-
- $this->verify('登録された配送商品情報');
-
- }
-
- public function testRegisterShipmentItem_DBに存在しないカラムを指定した場合_エラーなく登録できる() {
- // 引数の設定
- $order_id = '1';
- $shipping_id = '1';
- $arrParams = array(
- array(
- 'product_class_id' => '1',
- 'product_name' => '追加製品名01',
- 'product_code' => 'newcode01',
- 'classcategory_name1' => 'newcat01',
- 'classcategory_name2' => 'newcat02',
- 'price' => '2500',
- 'xxxx' => 'yyyyyy' // 存在しないカラム
- )
- );
-
- // 期待値の設定
- $this->expected['count'] = 1;
- $this->expected['first'] = array(
- 'product_class_id' => '1',
- 'product_name' => '追加製品名01',
- 'product_code' => 'newcode01',
- 'classcategory_name1' => 'newcat01',
- 'classcategory_name2' => 'newcat02',
- 'price' => '2500'
- );
-
- // 対象functionの呼び出し
- SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
- $result = $this->objQuery->select(
- 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
- 'dtb_shipment_item',
- 'order_id = ? and shipping_id = ?',
- array($order_id, $shipping_id)
- );
- $this->actual['count'] = count($result);
- $this->actual['first'] = $result[0];
-
- $this->verify('登録された配送商品情報');
-
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShipmentItemTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,205 @@
+<?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::registerShipmentItem()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_registerShipmentItemTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpShipmentItem();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testRegisterShipmentItem_製品クラスIDが入っていない場合_登録を行わない() {
+ // 引数の設定
+ $order_id = '1';
+ $shipping_id = '1';
+ $arrParams = array(
+ array(
+ // 'product_class_id' => '1',
+ 'product_name' => '追加製品名01',
+ 'product_code' => 'newcode01',
+ 'classcategory_name1' => 'newcat01',
+ 'classcategory_name2' => 'newcat02',
+ 'price' => '2500'
+ )
+ );
+
+ // 期待値の設定
+ $this->expected['count'] = 0;
+
+ // 対象functionの呼び出し
+ SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
+ $result = $this->objQuery->select(
+ 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
+ 'dtb_shipment_item',
+ 'order_id = ? and shipping_id = ?',
+ array($order_id, $shipping_id)
+ );
+ $this->actual['count'] = count($result);
+
+ $this->verify('登録された配送商品情報');
+ }
+
+ public function testRegisterShipmentItem_製品名等が指定されている場合_指定された値で登録を行う() {
+ // 引数の設定
+ $order_id = '1';
+ $shipping_id = '1';
+ $arrParams = array(
+ array(
+ 'product_class_id' => '1',
+ 'product_name' => '追加製品名01',
+ 'product_code' => 'newcode01',
+ 'classcategory_name1' => 'newcat01',
+ 'classcategory_name2' => 'newcat02',
+ 'price' => '2500'
+ )
+ );
+
+ // 期待値の設定
+ $this->expected['count'] = 1;
+ $this->expected['first'] = array(
+ 'product_class_id' => '1',
+ 'product_name' => '追加製品名01',
+ 'product_code' => 'newcode01',
+ 'classcategory_name1' => 'newcat01',
+ 'classcategory_name2' => 'newcat02',
+ 'price' => '2500'
+ );
+
+ // 対象functionの呼び出し
+ SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
+ $result = $this->objQuery->select(
+ 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
+ 'dtb_shipment_item',
+ 'order_id = ? and shipping_id = ?',
+ array($order_id, $shipping_id)
+ );
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = $result[0];
+
+ $this->verify('登録された配送商品情報');
+ }
+
+ public function testRegisterShipmentItem_製品名等が指定されていない場合_DBからマスタ情報を取得して登録を行う() {
+ // 引数の設定
+ $order_id = '1';
+ $shipping_id = '1';
+ $arrParams = array(
+ array(
+ 'product_class_id' => '1001'
+ // 'product_name' => '追加製品名01',
+ // 'product_code' => 'newcode01',
+ // 'classcategory_name1' => 'newcat01',
+ // 'classcategory_name2' => 'newcat02',
+ // 'price' => '2500'
+ )
+ );
+
+ // 期待値の設定
+ $this->expected['count'] = 1;
+ $this->expected['first'] = array(
+ 'product_class_id' => '1001',
+ 'product_name' => '製品名1001',
+ 'product_code' => 'code1001',
+ 'classcategory_name1' => 'cat1001',
+ 'classcategory_name2' => 'cat1002',
+ // TODO 要確認price01, price02を設定しても価格が取れない。実際にはDBから取るケースが無い?
+ //'price' => '1500'
+ 'price' => null
+ );
+
+ // 対象functionの呼び出し
+ SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
+ $result = $this->objQuery->select(
+ 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
+ 'dtb_shipment_item',
+ 'order_id = ? and shipping_id = ?',
+ array($order_id, $shipping_id)
+ );
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = $result[0];
+
+ $this->verify('登録された配送商品情報');
+
+ }
+
+ public function testRegisterShipmentItem_DBに存在しないカラムを指定した場合_エラーなく登録できる() {
+ // 引数の設定
+ $order_id = '1';
+ $shipping_id = '1';
+ $arrParams = array(
+ array(
+ 'product_class_id' => '1',
+ 'product_name' => '追加製品名01',
+ 'product_code' => 'newcode01',
+ 'classcategory_name1' => 'newcat01',
+ 'classcategory_name2' => 'newcat02',
+ 'price' => '2500',
+ 'xxxx' => 'yyyyyy' // 存在しないカラム
+ )
+ );
+
+ // 期待値の設定
+ $this->expected['count'] = 1;
+ $this->expected['first'] = array(
+ 'product_class_id' => '1',
+ 'product_name' => '追加製品名01',
+ 'product_code' => 'newcode01',
+ 'classcategory_name1' => 'newcat01',
+ 'classcategory_name2' => 'newcat02',
+ 'price' => '2500'
+ );
+
+ // 対象functionの呼び出し
+ SC_Helper_Purchase::registerShipmentItem($order_id, $shipping_id, $arrParams);
+ $result = $this->objQuery->select(
+ 'product_class_id,product_name,product_code,classcategory_name1,classcategory_name2,price',
+ 'dtb_shipment_item',
+ 'order_id = ? and shipping_id = ?',
+ array($order_id, $shipping_id)
+ );
+ $this->actual['count'] = count($result);
+ $this->actual['first'] = $result[0];
+
+ $this->verify('登録された配送商品情報');
+
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,171 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_registerShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- $this->setUpShippingOnDb();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testRegisterShipping_元々存在しない受注IDの場合_新規にデータが作られる() {
- $order_id = '10';
- $arrParams = array(
- '20' =>
- array(
- 'order_id' => '10',
- 'shipping_id' => '20',
- 'shipping_name01' => '配送情報10',
- 'shipping_date' => '2012/01/12'
- )
- );
-
- $this->expected['count'] = '3'; // 1件増える
- $this->expected['content'] = array(
- 'order_id' => '10',
- 'shipping_id' => '20',
- 'shipping_name01' => '配送情報10',
- 'shipping_date' => '2012-01-12 00:00:00'
- );
-
- SC_Helper_Purchase::registerShipping($order_id, $arrParams);
-
- $this->actual['count'] = $this->objQuery->count('dtb_shipping');
- $this->result = $this->objQuery->setWhere('order_id = ?')
- ->select(
- 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
- 'dtb_shipping',
- '',
- array($order_id));
- $this->actual['content'] = $this->result[0];
- unset($this->actual['content']['create_date']);
- unset($this->actual['content']['update_date']);
- $this->verify('登録した配送情報');
- $this->assertNotNull($this->result[0]['create_date']);
- $this->assertNotNull($this->result[0]['update_date']);
- }
-
- public function testRegisterShipping_元々存在する受注IDの場合_既存のデータが置き換えられる() {
- $order_id = '2';
- $arrParams = array(
- '30' =>
- array(
- 'order_id' => '2',
- 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update',
- 'shipping_date' => '2013/12/03'
- )
- );
-
- $this->expected['count'] = '2'; // 件数が変わらない
- $this->expected['content'] = array(
- 'order_id' => '2',
- 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update',
- 'shipping_date' => '2013-12-03 00:00:00'
- );
-
- SC_Helper_Purchase::registerShipping($order_id, $arrParams);
-
- $this->actual['count'] = $this->objQuery->count('dtb_shipping');
- $this->result = $this->objQuery->setWhere('order_id = ?')
- ->select(
- 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
- 'dtb_shipping',
- '',
- array($order_id));
- $this->actual['content'] = $this->result[0];
- unset($this->actual['content']['create_date']);
- unset($this->actual['content']['update_date']);
- $this->verify('登録した配送情報');
- $this->assertNotNull($this->result[0]['create_date']);
- $this->assertNotNull($this->result[0]['update_date']);
- }
-
- public function testRegisterShipping_配送日付が空の場合_エラーが起きず変換処理がスキップされる() {
- $order_id = '2';
- $arrParams = array(
- '30' =>
- array(
- 'order_id' => '2',
- 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update'
- // 'shipping_date' => '2013/12/03 00:00:00'
- )
- );
-
- $this->expected['count'] = '2';
- $this->expected['content'] = array(
- 'order_id' => '2',
- 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update',
- 'shipping_date' => NULL
- );
-
- SC_Helper_Purchase::registerShipping($order_id, $arrParams);
-
- $this->actual['count'] = $this->objQuery->count('dtb_shipping');
- $this->result = $this->objQuery->setWhere('order_id = ?')
- ->select(
- 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
- 'dtb_shipping',
- '',
- array($order_id));
- $this->actual['content'] = $this->result[0];
- unset($this->actual['content']['create_date']);
- unset($this->actual['content']['update_date']);
- $this->verify('登録した配送情報');
- $this->assertNotNull($this->result[0]['create_date']);
- $this->assertNotNull($this->result[0]['update_date']);
- }
-
- public function testRegisterShipping_非会員購入の場合_配送IDが設定される() {
- $order_id = '2';
- $arrParams = array(
- '30' =>
- array(
- 'order_id' => '2',
- // 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update',
- 'shipping_date' => '2013/12/03 00:00:00'
- )
- );
-
- $this->expected['count'] = '2'; // 件数が変わらない
- $this->expected['content'] = array(
- 'order_id' => '2',
- 'shipping_id' => '30',
- 'shipping_name01' => '配送情報02-update',
- 'shipping_date' => '2013-12-03 00:00:00'
- );
-
- SC_Helper_Purchase::registerShipping($order_id, $arrParams);
-
- $this->actual['count'] = $this->objQuery->count('dtb_shipping');
- $this->result = $this->objQuery->setWhere('order_id = ?')
- ->select(
- 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
- 'dtb_shipping',
- '',
- array($order_id));
- $this->actual['content'] = $this->result[0];
- unset($this->actual['content']['create_date']);
- unset($this->actual['content']['update_date']);
- $this->verify('登録した配送情報');
- $this->assertNotNull($this->result[0]['create_date']);
- $this->assertNotNull($this->result[0]['update_date']);
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_registerShippingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,171 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_registerShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ $this->setUpShippingOnDb();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testRegisterShipping_元々存在しない受注IDの場合_新規にデータが作られる() {
+ $order_id = '10';
+ $arrParams = array(
+ '20' =>
+ array(
+ 'order_id' => '10',
+ 'shipping_id' => '20',
+ 'shipping_name01' => '配送情報10',
+ 'shipping_date' => '2012/01/12'
+ )
+ );
+
+ $this->expected['count'] = '3'; // 1件増える
+ $this->expected['content'] = array(
+ 'order_id' => '10',
+ 'shipping_id' => '20',
+ 'shipping_name01' => '配送情報10',
+ 'shipping_date' => '2012-01-12 00:00:00'
+ );
+
+ SC_Helper_Purchase::registerShipping($order_id, $arrParams);
+
+ $this->actual['count'] = $this->objQuery->count('dtb_shipping');
+ $this->result = $this->objQuery->setWhere('order_id = ?')
+ ->select(
+ 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
+ 'dtb_shipping',
+ '',
+ array($order_id));
+ $this->actual['content'] = $this->result[0];
+ unset($this->actual['content']['create_date']);
+ unset($this->actual['content']['update_date']);
+ $this->verify('登録した配送情報');
+ $this->assertNotNull($this->result[0]['create_date']);
+ $this->assertNotNull($this->result[0]['update_date']);
+ }
+
+ public function testRegisterShipping_元々存在する受注IDの場合_既存のデータが置き換えられる() {
+ $order_id = '2';
+ $arrParams = array(
+ '30' =>
+ array(
+ 'order_id' => '2',
+ 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update',
+ 'shipping_date' => '2013/12/03'
+ )
+ );
+
+ $this->expected['count'] = '2'; // 件数が変わらない
+ $this->expected['content'] = array(
+ 'order_id' => '2',
+ 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update',
+ 'shipping_date' => '2013-12-03 00:00:00'
+ );
+
+ SC_Helper_Purchase::registerShipping($order_id, $arrParams);
+
+ $this->actual['count'] = $this->objQuery->count('dtb_shipping');
+ $this->result = $this->objQuery->setWhere('order_id = ?')
+ ->select(
+ 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
+ 'dtb_shipping',
+ '',
+ array($order_id));
+ $this->actual['content'] = $this->result[0];
+ unset($this->actual['content']['create_date']);
+ unset($this->actual['content']['update_date']);
+ $this->verify('登録した配送情報');
+ $this->assertNotNull($this->result[0]['create_date']);
+ $this->assertNotNull($this->result[0]['update_date']);
+ }
+
+ public function testRegisterShipping_配送日付が空の場合_エラーが起きず変換処理がスキップされる() {
+ $order_id = '2';
+ $arrParams = array(
+ '30' =>
+ array(
+ 'order_id' => '2',
+ 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update'
+ // 'shipping_date' => '2013/12/03 00:00:00'
+ )
+ );
+
+ $this->expected['count'] = '2';
+ $this->expected['content'] = array(
+ 'order_id' => '2',
+ 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update',
+ 'shipping_date' => NULL
+ );
+
+ SC_Helper_Purchase::registerShipping($order_id, $arrParams);
+
+ $this->actual['count'] = $this->objQuery->count('dtb_shipping');
+ $this->result = $this->objQuery->setWhere('order_id = ?')
+ ->select(
+ 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
+ 'dtb_shipping',
+ '',
+ array($order_id));
+ $this->actual['content'] = $this->result[0];
+ unset($this->actual['content']['create_date']);
+ unset($this->actual['content']['update_date']);
+ $this->verify('登録した配送情報');
+ $this->assertNotNull($this->result[0]['create_date']);
+ $this->assertNotNull($this->result[0]['update_date']);
+ }
+
+ public function testRegisterShipping_非会員購入の場合_配送IDが設定される() {
+ $order_id = '2';
+ $arrParams = array(
+ '30' =>
+ array(
+ 'order_id' => '2',
+ // 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update',
+ 'shipping_date' => '2013/12/03 00:00:00'
+ )
+ );
+
+ $this->expected['count'] = '2'; // 件数が変わらない
+ $this->expected['content'] = array(
+ 'order_id' => '2',
+ 'shipping_id' => '30',
+ 'shipping_name01' => '配送情報02-update',
+ 'shipping_date' => '2013-12-03 00:00:00'
+ );
+
+ SC_Helper_Purchase::registerShipping($order_id, $arrParams);
+
+ $this->actual['count'] = $this->objQuery->count('dtb_shipping');
+ $this->result = $this->objQuery->setWhere('order_id = ?')
+ ->select(
+ 'order_id,shipping_id,shipping_name01,shipping_date,create_date,update_date',
+ 'dtb_shipping',
+ '',
+ array($order_id));
+ $this->actual['content'] = $this->result[0];
+ unset($this->actual['content']['create_date']);
+ unset($this->actual['content']['update_date']);
+ $this->verify('登録した配送情報');
+ $this->assertNotNull($this->result[0]['create_date']);
+ $this->assertNotNull($this->result[0]['update_date']);
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,63 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_saveShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSaveShippingTemp_元々存在しない配送先IDの場合_新規に配列が作られる() {
- $this->setUpShipping($this->getMultipleShipping());
-
- SC_Helper_Purchase::saveShippingTemp(
- array('shipment_item' => '商品4', 'shipping_pref' => '大阪府')
- );
-
- $this->expected = array(
- 'count'=>4, // 配送情報全体の件数
- 'shipping_id'=>0,
- 'shipment_item'=>null,
- 'shipping_pref'=>'大阪府'
- );
- $this->actual['count'] = count($_SESSION['shipping']);
- $this->actual['shipping_id'] = $_SESSION['shipping']['0']['shipping_id'];
- $this->actual['shipment_item'] = $_SESSION['shipping']['0']['shipment_item'];
- $this->actual['shipping_pref'] = $_SESSION['shipping']['0']['shipping_pref'];
-
- $this->verify('登録した配送情報');
- }
-
- public function testSaveShippingTemp_元々存在する配送先IDの場合_情報がマージされる() {
- $this->setUpShipping($this->getMultipleShipping());
-
- SC_Helper_Purchase::saveShippingTemp(
- array('shipment_item' => '商品4', 'shipping_pref' => '大阪府'),
- '00001'
- );
-
- $this->expected = array(
- 'count'=>3, // 配送情報全体の件数
- 'shipping_id'=>'00001',
- 'shipment_item'=>array('商品1'),
- 'shipping_pref'=>'大阪府'
- );
- $this->actual['count'] = count($_SESSION['shipping']);
- $this->actual['shipping_id'] = $_SESSION['shipping']['00001']['shipping_id'];
- $this->actual['shipment_item'] = $_SESSION['shipping']['00001']['shipment_item'];
- $this->actual['shipping_pref'] = $_SESSION['shipping']['00001']['shipping_pref'];
-
- $this->verify('更新した配送情報');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_saveShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,63 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_saveShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSaveShippingTemp_元々存在しない配送先IDの場合_新規に配列が作られる() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ SC_Helper_Purchase::saveShippingTemp(
+ array('shipment_item' => '商品4', 'shipping_pref' => '大阪府')
+ );
+
+ $this->expected = array(
+ 'count'=>4, // 配送情報全体の件数
+ 'shipping_id'=>0,
+ 'shipment_item'=>null,
+ 'shipping_pref'=>'大阪府'
+ );
+ $this->actual['count'] = count($_SESSION['shipping']);
+ $this->actual['shipping_id'] = $_SESSION['shipping']['0']['shipping_id'];
+ $this->actual['shipment_item'] = $_SESSION['shipping']['0']['shipment_item'];
+ $this->actual['shipping_pref'] = $_SESSION['shipping']['0']['shipping_pref'];
+
+ $this->verify('登録した配送情報');
+ }
+
+ public function testSaveShippingTemp_元々存在する配送先IDの場合_情報がマージされる() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ SC_Helper_Purchase::saveShippingTemp(
+ array('shipment_item' => '商品4', 'shipping_pref' => '大阪府'),
+ '00001'
+ );
+
+ $this->expected = array(
+ 'count'=>3, // 配送情報全体の件数
+ 'shipping_id'=>'00001',
+ 'shipment_item'=>array('商品1'),
+ 'shipping_pref'=>'大阪府'
+ );
+ $this->actual['count'] = count($_SESSION['shipping']);
+ $this->actual['shipping_id'] = $_SESSION['shipping']['00001']['shipping_id'];
+ $this->actual['shipment_item'] = $_SESSION['shipping']['00001']['shipment_item'];
+ $this->actual['shipping_pref'] = $_SESSION['shipping']['00001']['shipping_pref'];
+
+ $this->verify('更新した配送情報');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,110 +0,0 @@
-<?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::setDownloadableFlgTo()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_setDownloadableFlgToTest extends SC_Helper_Purchase_TestBase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSetDownloadableFlgTo_販売価格が0円の場合_フラグがONになる() {
- $input = array(
- '1001' => array('price' => 0)
- );
-
- $this->expected = true;
- SC_Helper_Purchase::setDownloadableFlgTo($input);
- $this->actual = $input['1001']['is_downloadable'];
-
- $this->verify('ダウンロード可能フラグ設定結果');
- }
-
- public function testSetDownloadableFlgTo_ダウンロード期限内かつ入金日ありの場合_フラグがONになる() {
- $input = array(
- '1001' => array('price' => 1000, 'effective' => '1', 'payment_date' => '2012-12-12')
- );
-
- $this->expected = true;
- SC_Helper_Purchase::setDownloadableFlgTo($input);
- $this->actual = $input['1001']['is_downloadable'];
-
- $this->verify('ダウンロード可能フラグ設定結果');
- }
-
- public function testSetDownloadableFlgTo_ダウンロード期限内かつ入金日なしの場合_フラグがOFFになる() {
- $input = array(
- '1001' => array('price' => 1000, 'effective' => '1', 'payment_date' => null)
- );
-
- $this->expected = false;
- SC_Helper_Purchase::setDownloadableFlgTo($input);
- $this->actual = $input['1001']['is_downloadable'];
-
- $this->verify('ダウンロード可能フラグ設定結果');
- }
-
- public function testSetDownloadableFlgTo_ダウンロード期限外かつ入金日ありの場合_フラグがOFFになる() {
- $input = array(
- '1001' => array('price' => 1000, 'effective' => '0', 'payment_date' => '2012-12-12')
- );
-
- $this->expected = false;
- SC_Helper_Purchase::setDownloadableFlgTo($input);
- $this->actual = $input['1001']['is_downloadable'];
-
- $this->verify('ダウンロード可能フラグ設定結果');
- }
-
- public function testSetDownloadableFlgTo_ダウンロード期限外かつ入金日なしの場合_フラグがOFFになる() {
- $input = array(
- '1001' => array('price' => 1000, 'effective' => '0', 'payment_date' => null)
- );
-
- $this->expected = false;
- SC_Helper_Purchase::setDownloadableFlgTo($input);
- $this->actual = $input['1001']['is_downloadable'];
-
- $this->verify('ダウンロード可能フラグ設定結果');
- }
-
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_setDownloadableFlgToTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,110 @@
+<?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::setDownloadableFlgTo()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Helper_Purchase_setDownloadableFlgToTest extends SC_Helper_Purchase_TestBase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSetDownloadableFlgTo_販売価格が0円の場合_フラグがONになる() {
+ $input = array(
+ '1001' => array('price' => 0)
+ );
+
+ $this->expected = true;
+ SC_Helper_Purchase::setDownloadableFlgTo($input);
+ $this->actual = $input['1001']['is_downloadable'];
+
+ $this->verify('ダウンロード可能フラグ設定結果');
+ }
+
+ public function testSetDownloadableFlgTo_ダウンロード期限内かつ入金日ありの場合_フラグがONになる() {
+ $input = array(
+ '1001' => array('price' => 1000, 'effective' => '1', 'payment_date' => '2012-12-12')
+ );
+
+ $this->expected = true;
+ SC_Helper_Purchase::setDownloadableFlgTo($input);
+ $this->actual = $input['1001']['is_downloadable'];
+
+ $this->verify('ダウンロード可能フラグ設定結果');
+ }
+
+ public function testSetDownloadableFlgTo_ダウンロード期限内かつ入金日なしの場合_フラグがOFFになる() {
+ $input = array(
+ '1001' => array('price' => 1000, 'effective' => '1', 'payment_date' => null)
+ );
+
+ $this->expected = false;
+ SC_Helper_Purchase::setDownloadableFlgTo($input);
+ $this->actual = $input['1001']['is_downloadable'];
+
+ $this->verify('ダウンロード可能フラグ設定結果');
+ }
+
+ public function testSetDownloadableFlgTo_ダウンロード期限外かつ入金日ありの場合_フラグがOFFになる() {
+ $input = array(
+ '1001' => array('price' => 1000, 'effective' => '0', 'payment_date' => '2012-12-12')
+ );
+
+ $this->expected = false;
+ SC_Helper_Purchase::setDownloadableFlgTo($input);
+ $this->actual = $input['1001']['is_downloadable'];
+
+ $this->verify('ダウンロード可能フラグ設定結果');
+ }
+
+ public function testSetDownloadableFlgTo_ダウンロード期限外かつ入金日なしの場合_フラグがOFFになる() {
+ $input = array(
+ '1001' => array('price' => 1000, 'effective' => '0', 'payment_date' => null)
+ );
+
+ $this->expected = false;
+ SC_Helper_Purchase::setDownloadableFlgTo($input);
+ $this->actual = $input['1001']['is_downloadable'];
+
+ $this->verify('ダウンロード可能フラグ設定結果');
+ }
+
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,44 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_unsetAllShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
-
- // 空にするだけなので適当な値を設定
- $_SESSION['shipping'] = 'temp01';
- $_SESSION['multiple_temp'] = 'temp02';
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testUnsetAllShippingTemp_複数配送も破棄するフラグがOFFの場合_情報の一部が破棄される() {
- SC_Helper_Purchase::unsetAllShippingTemp();
-
- $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>FALSE);
- $this->actual['shipping'] = empty($_SESSION['shipping']);
- $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
-
- $this->verify('セッション情報が空かどうか');
- }
-
- public function testUnsetAllShippingTemp_複数配送も破棄するフラグがONの場合_全ての情報が破棄される() {
- SC_Helper_Purchase::unsetAllShippingTemp(TRUE);
-
- $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>TRUE);
- $this->actual['shipping'] = empty($_SESSION['shipping']);
- $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
-
- $this->verify('セッション情報が空かどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetAllShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,44 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_unsetAllShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+
+ // 空にするだけなので適当な値を設定
+ $_SESSION['shipping'] = 'temp01';
+ $_SESSION['multiple_temp'] = 'temp02';
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testUnsetAllShippingTemp_複数配送も破棄するフラグがOFFの場合_情報の一部が破棄される() {
+ SC_Helper_Purchase::unsetAllShippingTemp();
+
+ $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>FALSE);
+ $this->actual['shipping'] = empty($_SESSION['shipping']);
+ $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
+
+ $this->verify('セッション情報が空かどうか');
+ }
+
+ public function testUnsetAllShippingTemp_複数配送も破棄するフラグがONの場合_全ての情報が破棄される() {
+ SC_Helper_Purchase::unsetAllShippingTemp(TRUE);
+
+ $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>TRUE);
+ $this->actual['shipping'] = empty($_SESSION['shipping']);
+ $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
+
+ $this->verify('セッション情報が空かどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,40 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_unsetOneShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testUnsetOneShippingTemp__指定したIDの配送情報のみが破棄される() {
- $this->setUpShipping($this->getMultipleShipping());
-
- SC_Helper_Purchase::unsetOneShippingTemp('00002');
-
- $this->expected = array(
- '00001' => array(
- 'shipment_id' => '00001',
- 'shipment_item' => array('商品1'),
- 'shipping_pref' => '東京都'),
- '00003' => array(
- 'shipment_id' => '00003',
- 'shipment_item' => array(),
- 'shipping_pref' => '埼玉県')
- );
- $this->actual = $_SESSION['shipping'];
-
- $this->verify('配送情報');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetOneShippingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,40 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_unsetOneShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testUnsetOneShippingTemp__指定したIDの配送情報のみが破棄される() {
+ $this->setUpShipping($this->getMultipleShipping());
+
+ SC_Helper_Purchase::unsetOneShippingTemp('00002');
+
+ $this->expected = array(
+ '00001' => array(
+ 'shipment_id' => '00001',
+ 'shipment_item' => array('商品1'),
+ 'shipping_pref' => '東京都'),
+ '00003' => array(
+ 'shipment_id' => '00003',
+ 'shipment_item' => array(),
+ 'shipping_pref' => '埼玉県')
+ );
+ $this->actual = $_SESSION['shipping'];
+
+ $this->verify('配送情報');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,34 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/**
- *
- */
-class SC_Helper_Purchase_unsetShippingTempTest extends SC_Helper_Purchase_TestBase {
-
- protected function setUp() {
- parent::setUp();
-
- // 空にするだけなので適当な値を設定
- $_SESSION['shipping'] = 'temp01';
- $_SESSION['multiple_temp'] = 'temp02';
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testUnsetShippingTemp__配送情報がすべて破棄される() {
- SC_Helper_Purchase::unsetShippingTemp(TRUE);
-
- $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>TRUE);
- $this->actual['shipping'] = empty($_SESSION['shipping']);
- $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
-
- $this->verify('セッション情報が空かどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_unsetShippingTempTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,34 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
+/**
+ *
+ */
+class SC_Helper_Purchase_unsetShippingTempTest extends SC_Helper_Purchase_TestBase {
+
+ protected function setUp() {
+ parent::setUp();
+
+ // 空にするだけなので適当な値を設定
+ $_SESSION['shipping'] = 'temp01';
+ $_SESSION['multiple_temp'] = 'temp02';
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testUnsetShippingTemp__配送情報がすべて破棄される() {
+ SC_Helper_Purchase::unsetShippingTemp(TRUE);
+
+ $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>TRUE);
+ $this->actual['shipping'] = empty($_SESSION['shipping']);
+ $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
+
+ $this->verify('セッション情報が空かどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php
===================================================================
--- branches/version-2_12-dev/tests/class/replace/SC_Display_Ex.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,32 +0,0 @@
-<?php
-require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Display.php");
-/**
- * テスト用にSC_Displayクラスを変更してユーザエージェントを自在に設定できるようにしたクラスです。
- */
-class SC_Display_Ex extends SC_Display {
-
- /** テスト用に設定した端末種別 */
- static $dummyDevice = DEVICE_TYPE_PC;
-
- /**
- * 予めテスト用に設定された端末種別を取得します。
- * @static
- * @param $reset boolean
- * @return integer 端末種別ID
- */
- public static function detectDevice($reset = FALSE) {
- return self::$dummyDevice;
- }
-
- /**
- * テスト用に端末種別を設定します。
- *
- * @static
- * @param $deviceType 端末種別ID
- */
- public static function setDummyDevice($deviceType) {
- self::$dummyDevice = $deviceType;
- }
-}
-
-
コピーによる追加: branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/replace/SC_Display_Ex.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/replace/SC_Display_Ex.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,32 @@
+<?php
+require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Display.php");
+/**
+ * テスト用にSC_Displayクラスを変更してユーザエージェントを自在に設定できるようにしたクラスです。
+ */
+class SC_Display_Ex extends SC_Display {
+
+ /** テスト用に設定した端末種別 */
+ static $dummyDevice = DEVICE_TYPE_PC;
+
+ /**
+ * 予めテスト用に設定された端末種別を取得します。
+ * @static
+ * @param $reset boolean
+ * @return integer 端末種別ID
+ */
+ public static function detectDevice($reset = FALSE) {
+ return self::$dummyDevice;
+ }
+
+ /**
+ * テスト用に端末種別を設定します。
+ *
+ * @static
+ * @param $deviceType 端末種別ID
+ */
+ public static function setDummyDevice($deviceType) {
+ self::$dummyDevice = $deviceType;
+ }
+}
+
+
削除: branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php
===================================================================
--- branches/version-2_12-dev/tests/class/replace/SC_Response_Ex.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,44 +0,0 @@
-<?php
-require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Response.php");
-/**
- * テスト用にexitしないSC_Responseクラスです。
- */
-class SC_Response_Ex extends SC_Response {
-
- /** exitしたかどうかを保持するフラグ */
- var $exited = FALSE;
- /** リダイレクト先のパスを保持するフラグ */
- var $redirectPath = '';
-
- /**
- * SC_Response::actionExit()をラップし、PHPをexitさせないようにします。
- */
- function actionExit() {
- $this->exited = TRUE;
- }
-
- /**
- * SC_Response::sendRedirect()をラップし、PHPをexitさせないようにします。
- * また、リダイレクト先のパスを取得できるようにします。
- */
- function sendRedirect($location, $arrQueryString = array(), $inheritQuerySring = false, $useSsl = null) {
- $this->exited = TRUE;
- $this->redirectPath = $location;
- }
-
- /**
- * actionExit()が呼ばれたかどうかを取得します。
- */
- public function isExited() {
- return $this->exited;
- }
-
- /**
- * sendRedirect()で指定されたパスを取得します。
- */
- public function getRedirectPath() {
- return $this->redirectPath;
- }
-}
-
-
コピーによる追加: branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/replace/SC_Response_Ex.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/replace/SC_Response_Ex.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,44 @@
+<?php
+require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Response.php");
+/**
+ * テスト用にexitしないSC_Responseクラスです。
+ */
+class SC_Response_Ex extends SC_Response {
+
+ /** exitしたかどうかを保持するフラグ */
+ var $exited = FALSE;
+ /** リダイレクト先のパスを保持するフラグ */
+ var $redirectPath = '';
+
+ /**
+ * SC_Response::actionExit()をラップし、PHPをexitさせないようにします。
+ */
+ function actionExit() {
+ $this->exited = TRUE;
+ }
+
+ /**
+ * SC_Response::sendRedirect()をラップし、PHPをexitさせないようにします。
+ * また、リダイレクト先のパスを取得できるようにします。
+ */
+ function sendRedirect($location, $arrQueryString = array(), $inheritQuerySring = false, $useSsl = null) {
+ $this->exited = TRUE;
+ $this->redirectPath = $location;
+ }
+
+ /**
+ * actionExit()が呼ばれたかどうかを取得します。
+ */
+ public function isExited() {
+ return $this->exited;
+ }
+
+ /**
+ * sendRedirect()で指定されたパスを取得します。
+ */
+ public function getRedirectPath() {
+ return $this->redirectPath;
+ }
+}
+
+
削除: branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php
===================================================================
--- branches/version-2_12-dev/tests/class/test/util/Test_Utils.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,52 +0,0 @@
-<?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.
- */
-
-/**
- * テストケースで使う一般的なユーティリティを持つクラス.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class Test_Utils {
-
- /**
- * 連想配列から指定されたキーだけを抜き出したものを返します.
- * 入力の連想配列には変更を加えません.
- *
- * @static
- * @param input_array 入力の連想配列
- * @param map_keys 出力結果に入れたいキーを配列で指定します
- * @return 指定したキーのみを持つ連想配列
- */
- public static function mapArray($input_array, $map_keys) {
- $output_array = array();
- foreach ($map_keys as $index => $map_key) {
- $output_array[$map_key] = $input_array[$map_key];
- }
-
- return $output_array;
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/test/util/Test_Utils.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/test/util/Test_Utils.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,52 @@
+<?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.
+ */
+
+/**
+ * テストケースで使う一般的なユーティリティを持つクラス.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class Test_Utils {
+
+ /**
+ * 連想配列から指定されたキーだけを抜き出したものを返します.
+ * 入力の連想配列には変更を加えません.
+ *
+ * @static
+ * @param input_array 入力の連想配列
+ * @param map_keys 出力結果に入れたいキーを配列で指定します
+ * @return 指定したキーのみを持つ連想配列
+ */
+ public static function mapArray($input_array, $map_keys) {
+ $output_array = array();
+ foreach ($map_keys as $index => $map_key) {
+ $output_array[$map_key] = $input_array[$map_key];
+ }
+
+ return $output_array;
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/test/util/User_Utils.php
===================================================================
--- branches/version-2_12-dev/tests/class/test/util/User_Utils.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/test/util/User_Utils.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,57 +0,0 @@
-<?php
-
-/**
- * ユーザの状態をテストに合わせて変化させるユーティリティクラスです。
- *
- */
-class User_Utils {
-
- /**
- * 端末種別を設定します。
- *
- * @static
- * @param deviceType 端末種別ID
- */
- public static function setDeviceType($deviceType) {
- SC_Display_Ex::setDummyDevice($deviceType);
- }
-
- /**
- * ログイン状態を設定します。
- *
- * @static
- * @param isLogin true:ログインしている、false:ログインしていない
- */
- public static function setLoginState($isLogin, $customer = null, $objQuery = null) {
- if (!$isLogin) {
- $_SESSION['customer']['customer_id'] = null;
- $_SESSION['customer']['email'] = null;
- return;
- }
- if ($customer == null) {
- $customer = self::getDefaultCustomer();
- }
- $_SESSION['customer']['customer_id'] = $customer['customer_id'];
- $_SESSION['customer']['email'] = $customer['email'];
- $objQuery->insert('dtb_customer', $customer);
- }
-
- /**
- * ユーザ情報を外部から設定しなかった場合のデフォルト値を取得します。
- */
- private static function getDefaultCustomer() {
- $arrValue['customer_id'] = '999999998';
- $arrValue['name01'] = '苗字';
- $arrValue['name02'] = '名前';
- $arrValue['kana01'] = 'みょうじ';
- $arrValue['kana02'] = 'なまえ';
- $arrValue['email'] = 'sample @ sample.co.jp';
- $arrValue['secret_key'] = 'aaaaaa';
- $arrValue['status'] = 2;
- $arrValue['create_date'] = 'CURRENT_TIMESTAMP';
- $arrValue['update_date'] = 'CURRENT_TIMESTAMP';
-
- return $arrValue;
- }
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/test/util/User_Utils.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/test/util/User_Utils.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/test/util/User_Utils.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/test/util/User_Utils.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * ユーザの状態をテストに合わせて変化させるユーティリティクラスです。
+ *
+ */
+class User_Utils {
+
+ /**
+ * 端末種別を設定します。
+ *
+ * @static
+ * @param deviceType 端末種別ID
+ */
+ public static function setDeviceType($deviceType) {
+ SC_Display_Ex::setDummyDevice($deviceType);
+ }
+
+ /**
+ * ログイン状態を設定します。
+ *
+ * @static
+ * @param isLogin true:ログインしている、false:ログインしていない
+ */
+ public static function setLoginState($isLogin, $customer = null, $objQuery = null) {
+ if (!$isLogin) {
+ $_SESSION['customer']['customer_id'] = null;
+ $_SESSION['customer']['email'] = null;
+ return;
+ }
+ if ($customer == null) {
+ $customer = self::getDefaultCustomer();
+ }
+ $_SESSION['customer']['customer_id'] = $customer['customer_id'];
+ $_SESSION['customer']['email'] = $customer['email'];
+ $objQuery->insert('dtb_customer', $customer);
+ }
+
+ /**
+ * ユーザ情報を外部から設定しなかった場合のデフォルト値を取得します。
+ */
+ private static function getDefaultCustomer() {
+ $arrValue['customer_id'] = '999999998';
+ $arrValue['name01'] = '苗字';
+ $arrValue['name02'] = '名前';
+ $arrValue['kana01'] = 'みょうじ';
+ $arrValue['kana02'] = 'なまえ';
+ $arrValue['email'] = 'sample @ sample.co.jp';
+ $arrValue['secret_key'] = 'aaaaaa';
+ $arrValue['status'] = 2;
+ $arrValue['create_date'] = 'CURRENT_TIMESTAMP';
+ $arrValue['update_date'] = 'CURRENT_TIMESTAMP';
+
+ return $arrValue;
+ }
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,75 +0,0 @@
-<?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::arrayDefineIndexes()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_arrayDefineIndexesTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testArrayDefineIndexes_チェック対象のキーがすべて存在する場合_配列に変化がない() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $defineIndexes = array('banana', 'orange');
-
- $this->expected = $input_array;
- $this->actual = SC_Utils::arrayDefineIndexes($input_array, $defineIndexes);
-
- $this->verify();
- }
-
- public function testArrayDefineIndexes_チェック対象のキーが一部存在しない場合_配列に追加される() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $defineIndexes = array('tomato', 'banana', 'kiwi');
-
- $this->expected = array(
- 'apple' => 'りんご',
- 'banana' => 'バナナ',
- 'orange' => 'オレンジ',
- 'tomato' => '',
- 'kiwi' => ''
- );
- $this->actual = SC_Utils::arrayDefineIndexes($input_array, $defineIndexes);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_arrayDefineIndexesTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,75 @@
+<?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::arrayDefineIndexes()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_arrayDefineIndexesTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testArrayDefineIndexes_チェック対象のキーがすべて存在する場合_配列に変化がない() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $defineIndexes = array('banana', 'orange');
+
+ $this->expected = $input_array;
+ $this->actual = SC_Utils::arrayDefineIndexes($input_array, $defineIndexes);
+
+ $this->verify();
+ }
+
+ public function testArrayDefineIndexes_チェック対象のキーが一部存在しない場合_配列に追加される() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $defineIndexes = array('tomato', 'banana', 'kiwi');
+
+ $this->expected = array(
+ 'apple' => 'りんご',
+ 'banana' => 'バナナ',
+ 'orange' => 'オレンジ',
+ 'tomato' => '',
+ 'kiwi' => ''
+ );
+ $this->actual = SC_Utils::arrayDefineIndexes($input_array, $defineIndexes);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,57 +0,0 @@
-<?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::encodeRFC3986()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_encodeRFC3986Test extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testEncodeRFC3986_チルダが含まれる場合_エンコードされない() {
- $input = 'http://www.example.co.jp/~';
- $this->expected = 'http%3A%2F%2Fwww.example.co.jp%2F~';
- $this->actual = SC_Utils::encodeRFC3986($input);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_encodeRFC3986Test.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,57 @@
+<?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::encodeRFC3986()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_encodeRFC3986Test extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testEncodeRFC3986_チルダが含まれる場合_エンコードされない() {
+ $input = 'http://www.example.co.jp/~';
+ $this->expected = 'http%3A%2F%2Fwww.example.co.jp%2F~';
+ $this->actual = SC_Utils::encodeRFC3986($input);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,66 +0,0 @@
-<?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::getHash2Array()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_getHash2ArrayTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testGetHash2Array_必須キー指定がない場合_値のみの配列が返る() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $this->expected = array('りんご', 'バナナ', 'オレンジ');
- $this->actual = SC_Utils::getHash2Array($input_array);
-
- $this->verify();
- }
-
- public function testGetHash2Array_必須キー指定がある場合_指定キーの値のみの配列が返る() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $requires = array('banana', 'apple');
- $this->expected = array('りんご', 'バナナ');
- $this->actual = SC_Utils::getHash2Array($input_array, $requires);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getHash2ArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::getHash2Array()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_getHash2ArrayTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testGetHash2Array_必須キー指定がない場合_値のみの配列が返る() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $this->expected = array('りんご', 'バナナ', 'オレンジ');
+ $this->actual = SC_Utils::getHash2Array($input_array);
+
+ $this->verify();
+ }
+
+ public function testGetHash2Array_必須キー指定がある場合_指定キーの値のみの配列が返る() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $requires = array('banana', 'apple');
+ $this->expected = array('りんご', 'バナナ');
+ $this->actual = SC_Utils::getHash2Array($input_array, $requires);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,81 +0,0 @@
-<?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::getRealURL()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_getRealURLTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- // TODO ポート番号のためのコロンが必ず入ってしまうのはOK?
- public function testGetRealURL_親ディレクトリへの参照を含む場合_正しくパースできる() {
- $input = 'http://www.example.jp/aaa/../index.php';
- $this->expected = 'http://www.example.jp:/index.php';
- $this->actual = SC_Utils::getRealURL($input);
-
- $this->verify();
- }
-
- public function testGetRealURL_親ディレクトリへの参照を複数回含む場合_正しくパースできる() {
- $input = 'http://www.example.jp/aaa/bbb/../../ccc/ddd/../index.php';
- $this->expected = 'http://www.example.jp:/ccc/index.php';
- $this->actual = SC_Utils::getRealURL($input);
-
- $this->verify();
- }
-
- public function testGetRealURL_カレントディレクトリへの参照を含む場合_正しくパースできる() {
- $input = 'http://www.example.jp/aaa/./index.php';
- $this->expected = 'http://www.example.jp:/aaa/index.php';
- $this->actual = SC_Utils::getRealURL($input);
-
- $this->verify();
- }
-
- public function testGetRealURL_httpsの場合_正しくパースできる() {
- $input = 'https://www.example.jp/aaa/./index.php';
- $this->expected = 'https://www.example.jp:/aaa/index.php';
- $this->actual = SC_Utils::getRealURL($input);
-
- $this->verify();
- }
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getRealURLTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,81 @@
+<?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::getRealURL()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_getRealURLTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ // TODO ポート番号のためのコロンが必ず入ってしまうのはOK?
+ public function testGetRealURL_親ディレクトリへの参照を含む場合_正しくパースできる() {
+ $input = 'http://www.example.jp/aaa/../index.php';
+ $this->expected = 'http://www.example.jp:/index.php';
+ $this->actual = SC_Utils::getRealURL($input);
+
+ $this->verify();
+ }
+
+ public function testGetRealURL_親ディレクトリへの参照を複数回含む場合_正しくパースできる() {
+ $input = 'http://www.example.jp/aaa/bbb/../../ccc/ddd/../index.php';
+ $this->expected = 'http://www.example.jp:/ccc/index.php';
+ $this->actual = SC_Utils::getRealURL($input);
+
+ $this->verify();
+ }
+
+ public function testGetRealURL_カレントディレクトリへの参照を含む場合_正しくパースできる() {
+ $input = 'http://www.example.jp/aaa/./index.php';
+ $this->expected = 'http://www.example.jp:/aaa/index.php';
+ $this->actual = SC_Utils::getRealURL($input);
+
+ $this->verify();
+ }
+
+ public function testGetRealURL_httpsの場合_正しくパースできる() {
+ $input = 'https://www.example.jp/aaa/./index.php';
+ $this->expected = 'https://www.example.jp:/aaa/index.php';
+ $this->actual = SC_Utils::getRealURL($input);
+
+ $this->verify();
+ }
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,39 +0,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');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_getTableTagTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,39 @@
+<?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');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,75 +0,0 @@
-<?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::isAbsoluteRealPath()のテストクラス.
- * テスト用にOSの環境変数を定義することができないため、テストコード内で分岐します.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_Test extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testIsAbsoluteRealPath_絶対パスの場合_trueが返る() {
-
- if (strpos(PHP_OS, 'WIN')) {
- $input = 'C:/Program Files/username/hoge/hoge.txt';
- } else {
- $input = '/etc/php.ini';
- }
- $this->expected = true;
- $this->actual = SC_Utils::isAbsoluteRealPath($input);
-
- $this->verify();
- }
-
- public function testIsAbsoluteRealPath_相対パスの場合_trueが返る() {
-
- if (strpos(PHP_OS, 'WIN')) {
- $input = './system32/hoge/hoge.txt';
- } else {
- $input = '../etc/php.ini';
- }
- $this->expected = false;
- $this->actual = SC_Utils::isAbsoluteRealPath($input);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAbsoluteRealPathTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,75 @@
+<?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::isAbsoluteRealPath()のテストクラス.
+ * テスト用にOSの環境変数を定義することができないため、テストコード内で分岐します.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_Test extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testIsAbsoluteRealPath_絶対パスの場合_trueが返る() {
+
+ if (strpos(PHP_OS, 'WIN')) {
+ $input = 'C:/Program Files/username/hoge/hoge.txt';
+ } else {
+ $input = '/etc/php.ini';
+ }
+ $this->expected = true;
+ $this->actual = SC_Utils::isAbsoluteRealPath($input);
+
+ $this->verify();
+ }
+
+ public function testIsAbsoluteRealPath_相対パスの場合_trueが返る() {
+
+ if (strpos(PHP_OS, 'WIN')) {
+ $input = './system32/hoge/hoge.txt';
+ } else {
+ $input = '../etc/php.ini';
+ }
+ $this->expected = false;
+ $this->actual = SC_Utils::isAbsoluteRealPath($input);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,84 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に定数を定義
-define('HTTP_URL', 'http://sample.eccube.jp/');
-define('HTTPS_URL', 'https://sample.eccube.jp/');
-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::isAppInnerUrl()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_isAppInnerUrlTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- 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();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,84 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用に定数を定義
+define('HTTP_URL', 'http://sample.eccube.jp/');
+define('HTTPS_URL', 'https://sample.eccube.jp/');
+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::isAppInnerUrl()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_isAppInnerUrlTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ 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();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,129 +0,0 @@
-<?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::isBlank()のテストクラス.
- * 元々test/class/以下にあったテストを移行しています.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_isBlankTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testIsBlank_0バイト文字列の場合_trueが返る() {
- $input = '';
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_全角スペースの場合_trueが返る() {
- $input = ' ';
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_greedy指定なしで全角スペースの場合_falseが返る() {
- $input = ' ';
- $this->assertFalse(SC_Utils::isBlank($input, false), $input);
- }
-
- public function testIsBlank_空の配列の場合_trueが返る() {
- $input = array();
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_ネストした配列の場合_trueが返る() {
- $input = array(array(array()));
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_greedy指定なしでネストした配列の場合_falseが返る() {
- $input = array(array(array()));
- $this->assertFalse(SC_Utils::isBlank($input, false), $input);
- }
-
- public function testIsBlank_空でない配列の場合_falseが返る() {
- $input = array(array(array('1')));
- $this->assertFalse(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_greedy指定なしで空でない配列の場合_falseが返る() {
- $input = array(array(array('1')));
- $this->assertFalse(SC_Utils::isBlank($input, false), $input);
- }
-
- public function testIsBlank_全角スペースと空白の組み合わせの場合_trueが返る() {
- $input = " \n ";
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_greedy指定なしで全角スペースと空白の組み合わせの場合_falseが返る() {
- $input = " \n ";
- $this->assertFalse(SC_Utils::isBlank($input, false), $input);
- }
-
- public function testIsBlank_全角スペースと非空白の組み合わせの場合_falseが返る() {
- $input = ' A ';
- $this->assertFalse(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_greedy指定なしで全角スペースと非空白の組み合わせの場合_falseが返る() {
- $input = ' A ';
- $this->assertFalse(SC_Utils::isBlank($input, false), $input);
- }
-
- public function testIsBlank_数値のゼロを入力した場合_falseが返る() {
- $input = 0;
- $this->assertFalse(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_値が空の配列を入力した場合_trueが返る() {
- $input = array("");
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_すべてのホワイトスペースを並べた場合_trueが返る() {
- $input = " \t \n\r\x0B\0";
- $this->assertTrue(SC_Utils::isBlank($input), $input);
- }
-
- public function testIsBlank_通常の文字が含まれている場合_falseが返る() {
- $input = " AB \n\t";
- $this->assertFalse(SC_Utils::isBlank($input), $input);
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_isBlankTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,129 @@
+<?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::isBlank()のテストクラス.
+ * 元々test/class/以下にあったテストを移行しています.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_isBlankTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testIsBlank_0バイト文字列の場合_trueが返る() {
+ $input = '';
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_全角スペースの場合_trueが返る() {
+ $input = ' ';
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_greedy指定なしで全角スペースの場合_falseが返る() {
+ $input = ' ';
+ $this->assertFalse(SC_Utils::isBlank($input, false), $input);
+ }
+
+ public function testIsBlank_空の配列の場合_trueが返る() {
+ $input = array();
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_ネストした配列の場合_trueが返る() {
+ $input = array(array(array()));
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_greedy指定なしでネストした配列の場合_falseが返る() {
+ $input = array(array(array()));
+ $this->assertFalse(SC_Utils::isBlank($input, false), $input);
+ }
+
+ public function testIsBlank_空でない配列の場合_falseが返る() {
+ $input = array(array(array('1')));
+ $this->assertFalse(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_greedy指定なしで空でない配列の場合_falseが返る() {
+ $input = array(array(array('1')));
+ $this->assertFalse(SC_Utils::isBlank($input, false), $input);
+ }
+
+ public function testIsBlank_全角スペースと空白の組み合わせの場合_trueが返る() {
+ $input = " \n ";
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_greedy指定なしで全角スペースと空白の組み合わせの場合_falseが返る() {
+ $input = " \n ";
+ $this->assertFalse(SC_Utils::isBlank($input, false), $input);
+ }
+
+ public function testIsBlank_全角スペースと非空白の組み合わせの場合_falseが返る() {
+ $input = ' A ';
+ $this->assertFalse(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_greedy指定なしで全角スペースと非空白の組み合わせの場合_falseが返る() {
+ $input = ' A ';
+ $this->assertFalse(SC_Utils::isBlank($input, false), $input);
+ }
+
+ public function testIsBlank_数値のゼロを入力した場合_falseが返る() {
+ $input = 0;
+ $this->assertFalse(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_値が空の配列を入力した場合_trueが返る() {
+ $input = array("");
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_すべてのホワイトスペースを並べた場合_trueが返る() {
+ $input = " \t \n\r\x0B\0";
+ $this->assertTrue(SC_Utils::isBlank($input), $input);
+ }
+
+ public function testIsBlank_通常の文字が含まれている場合_falseが返る() {
+ $input = " AB \n\t";
+ $this->assertFalse(SC_Utils::isBlank($input), $input);
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,63 +0,0 @@
-<?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::jsonDecode()のテストクラス.
- * 環境によるfunctionの変更まではカバーできないため、簡単な出力のみテスト.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_jsonDecodeTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testJsonDecode__JSON形式にエンコードされた文字列からarrayに変換される() {
- $input = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
-
- $obj = new stdClass;
- $obj->a = 1;
- $obj->b = 2;
- $obj->c = 3;
- $obj->d = 4;
- $obj->e = 5;
- $this->expected = $obj;
- $this->actual = SC_Utils::jsonDecode($input);
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonDecodeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,63 @@
+<?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::jsonDecode()のテストクラス.
+ * 環境によるfunctionの変更まではカバーできないため、簡単な出力のみテスト.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_jsonDecodeTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testJsonDecode__JSON形式にエンコードされた文字列からarrayに変換される() {
+ $input = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
+
+ $obj = new stdClass;
+ $obj->a = 1;
+ $obj->b = 2;
+ $obj->c = 3;
+ $obj->d = 4;
+ $obj->e = 5;
+ $this->expected = $obj;
+ $this->actual = SC_Utils::jsonDecode($input);
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,57 +0,0 @@
-<?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::jsonEncode()のテストクラス.
- * 環境によるfunctionの変更まではカバーできないため、簡単な出力のみテスト.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_jsonEncodeTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testJsonEncode__JSON形式にエンコードされた文字列が返る() {
- $input = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
- $this->expected = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
- $this->actual = SC_Utils::jsonEncode($input);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_jsonEncodeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,57 @@
+<?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::jsonEncode()のテストクラス.
+ * 環境によるfunctionの変更まではカバーできないため、簡単な出力のみテスト.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_jsonEncodeTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testJsonEncode__JSON形式にエンコードされた文字列が返る() {
+ $input = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
+ $this->expected = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
+ $this->actual = SC_Utils::jsonEncode($input);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,48 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_repeatStrWithSeparatorTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testRepeatStrWithSeparator_反復回数が0回の場合_結果が0バイト文字列になる() {
- $this->expected = '';
- $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 0, '#');
-
- $this->verify('連結済みの文字列');
- }
-
- public function testRepeatStrWithSeparator_反復回数が1回の場合_区切り文字が入らない() {
- $this->expected = 'ECサイト';
- $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 1, '#');
-
- $this->verify('連結済みの文字列');
- }
-
- public function testRepeatStrWithSeparator_反復回数が2回以上の場合_区切り文字が入って出力される() {
- $this->expected = 'ECサイト#ECサイト#ECサイト#ECサイト#ECサイト';
- $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 5, '#');
-
- $this->verify('連結済みの文字列');
- }
-
- public function testRepeatStrWithSeparator_区切り文字が未指定の場合_カンマ区切りとなる() {
- $this->expected = 'ECサイト,ECサイト,ECサイト';
- $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 3);
-
- $this->verify('連結済みの文字列');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_repeatStrWithSeparatorTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,48 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_repeatStrWithSeparatorTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testRepeatStrWithSeparator_反復回数が0回の場合_結果が0バイト文字列になる() {
+ $this->expected = '';
+ $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 0, '#');
+
+ $this->verify('連結済みの文字列');
+ }
+
+ public function testRepeatStrWithSeparator_反復回数が1回の場合_区切り文字が入らない() {
+ $this->expected = 'ECサイト';
+ $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 1, '#');
+
+ $this->verify('連結済みの文字列');
+ }
+
+ public function testRepeatStrWithSeparator_反復回数が2回以上の場合_区切り文字が入って出力される() {
+ $this->expected = 'ECサイト#ECサイト#ECサイト#ECサイト#ECサイト';
+ $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 5, '#');
+
+ $this->verify('連結済みの文字列');
+ }
+
+ public function testRepeatStrWithSeparator_区切り文字が未指定の場合_カンマ区切りとなる() {
+ $this->expected = 'ECサイト,ECサイト,ECサイト';
+ $this->actual = SC_Utils::repeatStrWithSeparator('ECサイト', 3);
+
+ $this->verify('連結済みの文字列');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,89 +0,0 @@
-<?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::sfArrCombine()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfArrCombineTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfArrCombine_入力の配列が空の場合_結果も空になる() {
- $keys = array();
- $values = array();
-
- $this->expected = array();
- $this->actual = SC_Utils::sfArrCombine($keys, $values);
-
- $this->verify();
- }
-
- // TODO 要確認 キーの方が短い場合はエラーで良いのでは?
- public function testSfArrCombine_入力のキー配列の方が短い場合_余った値の配列の要素は無視される() {
- $keys = array('apple', 'banana');
- $values = array('りんご', 'バナナ', 'オレンジ', '梨');
-
- $this->expected = array(
- 'apple' => 'りんご',
- 'banana' => 'バナナ',
- null => '梨'
- );
- $this->actual = SC_Utils::sfArrCombine($keys, $values);
-
- $this->verify();
- }
-
- public function testSfArrCombine_入力のキー配列の方が長い場合_余ったキーの配列の要素は空になる() {
- $keys = array('apple', 'banana', 'orange', 'pear');
- $values = array('りんご', 'バナナ');
-
- $this->expected = array(
- 'apple' => 'りんご',
- 'banana' => 'バナナ',
- 'orange' => null,
- 'pear' => null
- );
- $this->actual = SC_Utils::sfArrCombine($keys, $values);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrCombineTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,89 @@
+<?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::sfArrCombine()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfArrCombineTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfArrCombine_入力の配列が空の場合_結果も空になる() {
+ $keys = array();
+ $values = array();
+
+ $this->expected = array();
+ $this->actual = SC_Utils::sfArrCombine($keys, $values);
+
+ $this->verify();
+ }
+
+ // TODO 要確認 キーの方が短い場合はエラーで良いのでは?
+ public function testSfArrCombine_入力のキー配列の方が短い場合_余った値の配列の要素は無視される() {
+ $keys = array('apple', 'banana');
+ $values = array('りんご', 'バナナ', 'オレンジ', '梨');
+
+ $this->expected = array(
+ 'apple' => 'りんご',
+ 'banana' => 'バナナ',
+ null => '梨'
+ );
+ $this->actual = SC_Utils::sfArrCombine($keys, $values);
+
+ $this->verify();
+ }
+
+ public function testSfArrCombine_入力のキー配列の方が長い場合_余ったキーの配列の要素は空になる() {
+ $keys = array('apple', 'banana', 'orange', 'pear');
+ $values = array('りんご', 'バナナ');
+
+ $this->expected = array(
+ 'apple' => 'りんご',
+ 'banana' => 'バナナ',
+ 'orange' => null,
+ 'pear' => null
+ );
+ $this->actual = SC_Utils::sfArrCombine($keys, $values);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,69 +0,0 @@
-<?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::sfArrayIntersectKeys()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfArrayIntersectKeysTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfArrayIntersectKeys_指定キーに含まれるものがない場合_空の配列が返る() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $key_array = array('kiwi', 'tomato');
-
- $this->expected = array();
- $this->actual = SC_Utils::sfArrayIntersectKeys($input_array, $key_array);
-
- $this->verify();
- }
-
- public function testSfArrayIntersctKeys_指定キーに含まれるものがある場合_含まれるものだけが返る() {
- $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
- $key_array = array('orange', 'apple');
-
- $this->expected = array('apple' => 'りんご', 'orange' => 'オレンジ');
- $this->actual = SC_Utils::sfArrayIntersectKeys($input_array, $key_array);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfArrayIntersectKeysTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,69 @@
+<?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::sfArrayIntersectKeys()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfArrayIntersectKeysTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfArrayIntersectKeys_指定キーに含まれるものがない場合_空の配列が返る() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $key_array = array('kiwi', 'tomato');
+
+ $this->expected = array();
+ $this->actual = SC_Utils::sfArrayIntersectKeys($input_array, $key_array);
+
+ $this->verify();
+ }
+
+ public function testSfArrayIntersctKeys_指定キーに含まれるものがある場合_含まれるものだけが返る() {
+ $input_array = array('apple' => 'りんご', 'banana' => 'バナナ', 'orange' => 'オレンジ');
+ $key_array = array('orange', 'apple');
+
+ $this->expected = array('apple' => 'りんご', 'orange' => 'オレンジ');
+ $this->actual = SC_Utils::sfArrayIntersectKeys($input_array, $key_array);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,52 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfCalcIncTaxTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfCalcIncTax_四捨五入の場合_四捨五入の結果になる() {
- $this->expected = array(141, 152);
- $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 1); // 1:四捨五入
- $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 1); // 1:四捨五入
-
- $this->verify('税込価格');
- }
-
- public function testSfCalcIncTax_切り捨ての場合_切り捨ての結果になる() {
- $this->expected = array(142, 153);
- $this->actual[0] = SC_Utils::sfCalcIncTax(140, 2, 2); // 2:切り捨て
- $this->actual[1] = SC_Utils::sfCalcIncTax(150, 2, 2); // 2:切り捨て
-
- $this->verify('税込価格');
- }
-
- public function testSfCalcIncTax_切り上げの場合_切り上げの結果になる() {
- $this->expected = array(142, 152);
- $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 3); // 3:切り上げ
- $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 3); // 3:切り上げ
-
- $this->verify('税込価格');
- }
-
- public function testSfCalcIncTax_それ以外の場合_切り上げの結果になる() {
- $this->expected = array(142, 152);
- $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 4);
- $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 4);
-
- $this->verify('税込価格');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfCalcIncTaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,52 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfCalcIncTaxTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfCalcIncTax_四捨五入の場合_四捨五入の結果になる() {
+ $this->expected = array(141, 152);
+ $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 1); // 1:四捨五入
+ $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 1); // 1:四捨五入
+
+ $this->verify('税込価格');
+ }
+
+ public function testSfCalcIncTax_切り捨ての場合_切り捨ての結果になる() {
+ $this->expected = array(142, 153);
+ $this->actual[0] = SC_Utils::sfCalcIncTax(140, 2, 2); // 2:切り捨て
+ $this->actual[1] = SC_Utils::sfCalcIncTax(150, 2, 2); // 2:切り捨て
+
+ $this->verify('税込価格');
+ }
+
+ public function testSfCalcIncTax_切り上げの場合_切り上げの結果になる() {
+ $this->expected = array(142, 152);
+ $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 3); // 3:切り上げ
+ $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 3); // 3:切り上げ
+
+ $this->verify('税込価格');
+ }
+
+ public function testSfCalcIncTax_それ以外の場合_切り上げの結果になる() {
+ $this->expected = array(142, 152);
+ $this->actual[0] = SC_Utils::sfCalcIncTax(140, 1, 4);
+ $this->actual[1] = SC_Utils::sfCalcIncTax(150, 1, 4);
+
+ $this->verify('税込価格');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,65 +0,0 @@
-<?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::sfDBDatetoTime()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfDBDatetoTimeTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfDbDatetoTime_時刻にマイクロ秒が含まれている場合_マイクロ秒を無視して変換できる() {
-
- $this->expected = mktime(10, 20, 30, 10, 31, 2012);
- $this->actual = SC_Utils::sfDbDatetoTime('2012-10-31 10:20:30.000002');
-
- $this->verify();
- }
-
- public function testSfDbDatetoTime_時刻にマイクロ秒が含まれていない場合_そのまま変換できる() {
-
- $this->expected = mktime(10, 20, 30, 10, 31, 2012);
- $this->actual = SC_Utils::sfDbDatetoTime('2012-10-31 10:20:30');
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDBDateToTimeTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,65 @@
+<?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::sfDBDatetoTime()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfDBDatetoTimeTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfDbDatetoTime_時刻にマイクロ秒が含まれている場合_マイクロ秒を無視して変換できる() {
+
+ $this->expected = mktime(10, 20, 30, 10, 31, 2012);
+ $this->actual = SC_Utils::sfDbDatetoTime('2012-10-31 10:20:30.000002');
+
+ $this->verify();
+ }
+
+ public function testSfDbDatetoTime_時刻にマイクロ秒が含まれていない場合_そのまま変換できる() {
+
+ $this->expected = mktime(10, 20, 30, 10, 31, 2012);
+ $this->actual = SC_Utils::sfDbDatetoTime('2012-10-31 10:20:30');
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,90 +0,0 @@
-<?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::sfDispDBDate()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfDispDBDateTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfDispDBDate_年が指定されていない場合_0バイト文字列が返る() {
- $dbdate = '-01-23 01:12:24';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfDispDBDate($dbdate);
-
- $this->verify();
- }
- public function testSfDispDBDate_月が指定されていない場合_0バイト文字列が返る() {
- $dbdate = '2012--23 01:12:24';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfDispDBDate($dbdate);
-
- $this->verify();
- }
- public function testSfDispDBDate_日が指定されていない場合_0バイト文字列が返る() {
- $dbdate = '2012-01- 01:12:24';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfDispDBDate($dbdate);
-
- $this->verify();
- }
- public function testSfDispDBDate_年月日すべて存在する場合_フォーマット済み文字列が返る() {
- $dbdate = '2012-1-23 1:12:24';
-
- $this->expected = '2012/01/23 01:12';
- $this->actual = SC_Utils::sfDispDBDate($dbdate);
-
- $this->verify();
- }
- public function testSfDispDBDate_時刻表示フラグがOFFの場合_時刻なしのフォーマット済み文字列が返る() {
- $dbdate = '2012-1-23 1:12:24';
-
- $this->expected = '2012/01/23';
- $this->actual = SC_Utils::sfDispDBDate($dbdate, false);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfDispDBDateTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,90 @@
+<?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::sfDispDBDate()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfDispDBDateTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfDispDBDate_年が指定されていない場合_0バイト文字列が返る() {
+ $dbdate = '-01-23 01:12:24';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfDispDBDate($dbdate);
+
+ $this->verify();
+ }
+ public function testSfDispDBDate_月が指定されていない場合_0バイト文字列が返る() {
+ $dbdate = '2012--23 01:12:24';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfDispDBDate($dbdate);
+
+ $this->verify();
+ }
+ public function testSfDispDBDate_日が指定されていない場合_0バイト文字列が返る() {
+ $dbdate = '2012-01- 01:12:24';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfDispDBDate($dbdate);
+
+ $this->verify();
+ }
+ public function testSfDispDBDate_年月日すべて存在する場合_フォーマット済み文字列が返る() {
+ $dbdate = '2012-1-23 1:12:24';
+
+ $this->expected = '2012/01/23 01:12';
+ $this->actual = SC_Utils::sfDispDBDate($dbdate);
+
+ $this->verify();
+ }
+ public function testSfDispDBDate_時刻表示フラグがOFFの場合_時刻なしのフォーマット済み文字列が返る() {
+ $dbdate = '2012-1-23 1:12:24';
+
+ $this->expected = '2012/01/23';
+ $this->actual = SC_Utils::sfDispDBDate($dbdate, false);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,71 +0,0 @@
-<?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::sfGetAddPoint()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetAddPointTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetAddPoint_計算結果が正になる場合_値がそのまま返る() {
- $totalpoint = 100;
- $use_point = 2000;
- $point_rate = 4;
-
- $this->expected = 20;
- $this->actual = SC_Utils::sfGetAddPoint($totalpoint, $use_point, $point_rate);
-
- $this->verify();
- }
-
- public function testSfGetAddPoint_計算結果が負になる場合_0が返る() {
- $totalpoint = 70;
- $use_point = 2000;
- $point_rate = 4;
-
- $this->expected = 0;
- $this->actual = SC_Utils::sfGetAddPoint($totalpoint, $use_point, $point_rate);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetAddPointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,71 @@
+<?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::sfGetAddPoint()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetAddPointTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetAddPoint_計算結果が正になる場合_値がそのまま返る() {
+ $totalpoint = 100;
+ $use_point = 2000;
+ $point_rate = 4;
+
+ $this->expected = 20;
+ $this->actual = SC_Utils::sfGetAddPoint($totalpoint, $use_point, $point_rate);
+
+ $this->verify();
+ }
+
+ public function testSfGetAddPoint_計算結果が負になる場合_0が返る() {
+ $totalpoint = 70;
+ $use_point = 2000;
+ $point_rate = 4;
+
+ $this->expected = 0;
+ $this->actual = SC_Utils::sfGetAddPoint($totalpoint, $use_point, $point_rate);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,67 +0,0 @@
-<?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::sfGetBrothersArray()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetBrothersArrayTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetBrothersArray__与えられたIDの兄弟要素だけが抽出される() {
- $input_array = array(
- array('parent_id' => '1001', 'child_id' => '1001001'),
- array('parent_id' => '1002', 'child_id' => '1002001'),
- array('parent_id' => '1002', 'child_id' => '1002002'),
- array('parent_id' => '1003', 'child_id' => '1003001'),
- array('parent_id' => '1004', 'child_id' => '1004001')
- );
- $this->expected = array('1002001', '1002002', '1004001');
- $this->actual = SC_Utils::sfGetBrothersArray(
- $input_array,
- 'parent_id',
- 'child_id',
- array('1002001', '1004001')
- );
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetBrothersArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfGetBrothersArray()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetBrothersArrayTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetBrothersArray__与えられたIDの兄弟要素だけが抽出される() {
+ $input_array = array(
+ array('parent_id' => '1001', 'child_id' => '1001001'),
+ array('parent_id' => '1002', 'child_id' => '1002001'),
+ array('parent_id' => '1002', 'child_id' => '1002002'),
+ array('parent_id' => '1003', 'child_id' => '1003001'),
+ array('parent_id' => '1004', 'child_id' => '1004001')
+ );
+ $this->expected = array('1002001', '1002002', '1004001');
+ $this->actual = SC_Utils::sfGetBrothersArray(
+ $input_array,
+ 'parent_id',
+ 'child_id',
+ array('1002001', '1004001')
+ );
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,63 +0,0 @@
-<?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::sfGetChecked()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetCheckedTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetChecked_引数が一致する場合_チェック済みの文字列が返る() {
- $this->expected = 'checked="checked"';
- $this->actual = SC_Utils::sfGetChecked('1', '1');
-
- $this->verify();
- }
-
- public function testSfGetChecked_引数が一致しない場合_0バイト文字列が返る() {
- $this->expected = '';
- $this->actual = SC_Utils::sfGetChecked('2', '1');
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCheckedTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,63 @@
+<?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::sfGetChecked()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetCheckedTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetChecked_引数が一致する場合_チェック済みの文字列が返る() {
+ $this->expected = 'checked="checked"';
+ $this->actual = SC_Utils::sfGetChecked('1', '1');
+
+ $this->verify();
+ }
+
+ public function testSfGetChecked_引数が一致しない場合_0バイト文字列が返る() {
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetChecked('2', '1');
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,58 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfGetCommaListTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetCommaList_配列が空の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfGetCommaList(array());
-
- $this->verify('連結済みの文字列');
- }
-
- public function testSfGetCommaList_スペースフラグが立っている場合_スペース付きで連結される() {
- $this->expected = 'りんご, ミカン, バナナ';
- $this->actual = SC_Utils::sfGetCommaList(
- array('りんご', 'ミカン', 'バナナ'),
- TRUE,
- array());
-
- $this->verify('連結済みの文字列');
- }
-
- public function testSfGetCommaList_スペースフラグが倒れている場合_スペース付きで連結される() {
- $this->expected = 'りんご,ミカン,バナナ';
- $this->actual = SC_Utils::sfGetCommaList(
- array('りんご', 'ミカン', 'バナナ'),
- FALSE,
- array());
-
- $this->verify('連結済みの文字列');
- }
-
- // TODO 要確認:arrpopの役割
- public function testSfGetCommaList_除外リストが指定されている場合_スペース付きで連結される() {
- $this->expected = 'りんご, バナナ';
- $this->actual = SC_Utils::sfGetCommaList(
- array('りんご', 'ミカン', 'バナナ'),
- TRUE,
- array('梨', 'ミカン', '柿'));
-
- $this->verify('連結済みの文字列');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetCommaListTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,58 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfGetCommaListTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetCommaList_配列が空の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfGetCommaList(array());
+
+ $this->verify('連結済みの文字列');
+ }
+
+ public function testSfGetCommaList_スペースフラグが立っている場合_スペース付きで連結される() {
+ $this->expected = 'りんご, ミカン, バナナ';
+ $this->actual = SC_Utils::sfGetCommaList(
+ array('りんご', 'ミカン', 'バナナ'),
+ TRUE,
+ array());
+
+ $this->verify('連結済みの文字列');
+ }
+
+ public function testSfGetCommaList_スペースフラグが倒れている場合_スペース付きで連結される() {
+ $this->expected = 'りんご,ミカン,バナナ';
+ $this->actual = SC_Utils::sfGetCommaList(
+ array('りんご', 'ミカン', 'バナナ'),
+ FALSE,
+ array());
+
+ $this->verify('連結済みの文字列');
+ }
+
+ // TODO 要確認:arrpopの役割
+ public function testSfGetCommaList_除外リストが指定されている場合_スペース付きで連結される() {
+ $this->expected = 'りんご, バナナ';
+ $this->actual = SC_Utils::sfGetCommaList(
+ array('りんご', 'ミカン', 'バナナ'),
+ TRUE,
+ array('梨', 'ミカン', '柿'));
+
+ $this->verify('連結済みの文字列');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,68 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に背景色を設定
-define('ERR_COLOR', 'blue');
-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::sfGetEnabled()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetEnabledTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- // TODO 要確認 実際には使われていない?
- public function testSfGetEnabled_falseを指定した場合_無効化するための文字列が返る() {
-
- $this->expected = ' disabled="disabled"';
- $this->actual = SC_Utils::sfGetEnabled(false);
-
- $this->verify();
- }
-
- public function testSfGetEnabled_trueを指定した場合_0バイト文字列が返る() {
-
- $this->expected = '';
- $this->actual = SC_Utils::sfGetEnabled(true);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetEnabledTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,68 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用に背景色を設定
+define('ERR_COLOR', 'blue');
+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::sfGetEnabled()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetEnabledTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ // TODO 要確認 実際には使われていない?
+ public function testSfGetEnabled_falseを指定した場合_無効化するための文字列が返る() {
+
+ $this->expected = ' disabled="disabled"';
+ $this->actual = SC_Utils::sfGetEnabled(false);
+
+ $this->verify();
+ }
+
+ public function testSfGetEnabled_trueを指定した場合_0バイト文字列が返る() {
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetEnabled(true);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,68 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に背景色を設定
-define('ERR_COLOR', 'blue');
-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::sfGetErrorColor()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetErrorColorTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- // TODO 要確認 実際には使われていない?
- public function testSfGetErrorColor_引数が空でない場合_背景色変更用の文字列が返る() {
-
- $this->expected = 'background-color:blue';
- $this->actual = SC_Utils::sfGetErrorColor('value');
-
- $this->verify();
- }
-
- public function testSfGetErrorColor_引数が空の場合_0バイト文字列が返る() {
-
- $this->expected = '';
- $this->actual = SC_Utils::sfGetErrorColor();
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetErrorColorTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,68 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用に背景色を設定
+define('ERR_COLOR', 'blue');
+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::sfGetErrorColor()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetErrorColorTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ // TODO 要確認 実際には使われていない?
+ public function testSfGetErrorColor_引数が空でない場合_背景色変更用の文字列が返る() {
+
+ $this->expected = 'background-color:blue';
+ $this->actual = SC_Utils::sfGetErrorColor('value');
+
+ $this->verify();
+ }
+
+ public function testSfGetErrorColor_引数が空の場合_0バイト文字列が返る() {
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetErrorColor();
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,65 +0,0 @@
-<?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::sfGetHashString()のテストクラス.
- * 暗号化結果の詳細までは見られないため、変換がされていることだけを確かめます。
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetHashString_authTypeHmacTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetHashString_暗号化ありの設定になっている場合_文字列が変換される() {
- $input = 'hello, world';
- $salt = 'sample';
-
- $output = SC_Utils::sfGetHashString($input, $salt);
-
- $this->assertNotEquals('入力前後の文字列', $input, $output);
- }
-
- public function testSfGetHashString_暗号化ありの設定になっていてsaltがない場合_文字列が変換される() {
- $input = 'hello, world';
- $output = SC_Utils::sfGetHashString($input);
-
- $this->assertNotEquals('入力前後の文字列', $input, $output);
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypeHmacTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,65 @@
+<?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::sfGetHashString()のテストクラス.
+ * 暗号化結果の詳細までは見られないため、変換がされていることだけを確かめます。
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetHashString_authTypeHmacTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetHashString_暗号化ありの設定になっている場合_文字列が変換される() {
+ $input = 'hello, world';
+ $salt = 'sample';
+
+ $output = SC_Utils::sfGetHashString($input, $salt);
+
+ $this->assertNotEquals('入力前後の文字列', $input, $output);
+ }
+
+ public function testSfGetHashString_暗号化ありの設定になっていてsaltがない場合_文字列が変換される() {
+ $input = 'hello, world';
+ $output = SC_Utils::sfGetHashString($input);
+
+ $this->assertNotEquals('入力前後の文字列', $input, $output);
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,58 +0,0 @@
-<?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::sfGetHashString()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetHashString_authTypePlainTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetHashString_暗号化なしの設定になっている場合_文字列が変換されない() {
- $input = 'hello, world';
-
- $this->expected = $input;
- $this->actual = SC_Utils::sfGetHashString($input);
-
- $this->verify();
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/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 (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetHashString_authTypePlainTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,58 @@
+<?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::sfGetHashString()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetHashString_authTypePlainTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetHashString_暗号化なしの設定になっている場合_文字列が変換されない() {
+ $input = 'hello, world';
+
+ $this->expected = $input;
+ $this->actual = SC_Utils::sfGetHashString($input);
+
+ $this->verify();
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,35 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfGetRandomStringTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- // ランダムな文字列取得なので、文字列長のみ確認します。
- public function testSfGetRandomString_文字列長未指定の場合_長さ1の文字列が取得できる() {
- $this->expected = 1;
- $this->actual = strlen(SC_Utils::sfGetRandomString());
-
- $this->verify('文字列長');
- }
-
- public function testSfGetRandomString_文字列長指定ありの場合_指定した長さの文字列が取得できる() {
- $this->expected = 10;
- $this->actual = strlen(SC_Utils::sfGetRandomString(10));
-
- $this->verify('文字列長');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetRandomStringTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,35 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfGetRandomStringTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ // ランダムな文字列取得なので、文字列長のみ確認します。
+ public function testSfGetRandomString_文字列長未指定の場合_長さ1の文字列が取得できる() {
+ $this->expected = 1;
+ $this->actual = strlen(SC_Utils::sfGetRandomString());
+
+ $this->verify('文字列長');
+ }
+
+ public function testSfGetRandomString_文字列長指定ありの場合_指定した長さの文字列が取得できる() {
+ $this->expected = 10;
+ $this->actual = strlen(SC_Utils::sfGetRandomString(10));
+
+ $this->verify('文字列長');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,83 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に定数を指定
-define('SEARCH_PMAX', 20);
-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::sfGetSearchPageMax()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetSearchPageMaxTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetSearchPageMax_正の整数が指定されている場合_指定の値が返る() {
-
- $this->expected = 100;
- $this->actual = SC_Utils::sfGetSearchPageMax(100);
-
- $this->verify();
- }
-
- public function testSfGetSearchPageMax_正の小数が指定されている場合_整数に変換される() {
-
- $this->expected = 99;
- $this->actual = SC_Utils::sfGetSearchPageMax(99.5);
-
- $this->verify();
- }
-
- public function testSfGetSearchPageMax_負の数が指定されている場合_デフォルト値が返る() {
-
- $this->expected = 20;
- $this->actual = SC_Utils::sfGetSearchPageMax(-50);
-
- $this->verify();
- }
-
- public function testSfGetSearchPageMax_指定がない場合_デフォルト値が返る() {
-
- $this->expected = 20;
- $this->actual = SC_Utils::sfGetSearchPageMax();
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetSearchPageMaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,83 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用に定数を指定
+define('SEARCH_PMAX', 20);
+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::sfGetSearchPageMax()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetSearchPageMaxTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetSearchPageMax_正の整数が指定されている場合_指定の値が返る() {
+
+ $this->expected = 100;
+ $this->actual = SC_Utils::sfGetSearchPageMax(100);
+
+ $this->verify();
+ }
+
+ public function testSfGetSearchPageMax_正の小数が指定されている場合_整数に変換される() {
+
+ $this->expected = 99;
+ $this->actual = SC_Utils::sfGetSearchPageMax(99.5);
+
+ $this->verify();
+ }
+
+ public function testSfGetSearchPageMax_負の数が指定されている場合_デフォルト値が返る() {
+
+ $this->expected = 20;
+ $this->actual = SC_Utils::sfGetSearchPageMax(-50);
+
+ $this->verify();
+ }
+
+ public function testSfGetSearchPageMax_指定がない場合_デフォルト値が返る() {
+
+ $this->expected = 20;
+ $this->actual = SC_Utils::sfGetSearchPageMax();
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,101 +0,0 @@
-<?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::sfGetTimestamp()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetTimestampTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetTimestamp_年が設定されていない場合_0バイト文字列が返る() {
- $year = '';
- $month = '10';
- $day = '23';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
- $this->verify();
- }
-
- public function testSfGetTimestamp_月が設定されていない場合_0バイト文字列が返る() {
- $year = '2012';
- $month = '';
- $day = '13';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
- $this->verify();
- }
-
- public function testSfGetTimestamp_日が設定されていない場合_0バイト文字列が返る() {
- $year = '1999';
- $month = '09';
- $day = '';
-
- $this->expected = '';
- $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
- $this->verify();
- }
-
- public function testSfGetTimestamp_年月日すべて設定されている場合_連結された文字列が返る() {
- $year = '1999';
- $month = '09';
- $day = '23';
-
- $this->expected = '1999-09-23 00:00:00';
- $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
-
- $this->verify();
- }
-
- public function testSfGetTimestamp_最終時刻フラグがONの場合_時刻が深夜のものになる() {
- $year = '1999';
- $month = '09';
- $day = '23';
-
- $this->expected = '1999-09-23 23:59:59';
- $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day, true);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetTimestampTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfGetTimestamp()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetTimestampTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetTimestamp_年が設定されていない場合_0バイト文字列が返る() {
+ $year = '';
+ $month = '10';
+ $day = '23';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
+ $this->verify();
+ }
+
+ public function testSfGetTimestamp_月が設定されていない場合_0バイト文字列が返る() {
+ $year = '2012';
+ $month = '';
+ $day = '13';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
+ $this->verify();
+ }
+
+ public function testSfGetTimestamp_日が設定されていない場合_0バイト文字列が返る() {
+ $year = '1999';
+ $month = '09';
+ $day = '';
+
+ $this->expected = '';
+ $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
+ $this->verify();
+ }
+
+ public function testSfGetTimestamp_年月日すべて設定されている場合_連結された文字列が返る() {
+ $year = '1999';
+ $month = '09';
+ $day = '23';
+
+ $this->expected = '1999-09-23 00:00:00';
+ $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day);
+
+ $this->verify();
+ }
+
+ public function testSfGetTimestamp_最終時刻フラグがONの場合_時刻が深夜のものになる() {
+ $year = '1999';
+ $month = '09';
+ $day = '23';
+
+ $this->expected = '1999-09-23 23:59:59';
+ $this->actual = SC_Utils::sfGetTimestamp($year, $month, $day, true);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,67 +0,0 @@
-<?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::sfGetUnderChildrenArray()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetUnderChildrenArrayTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfGetUnderChildrenArray__与えられた親IDを持つ要素だけが抽出される() {
- $input_array = array(
- array('parent_id' => '1001', 'child_id' => '1001001'),
- array('parent_id' => '1002', 'child_id' => '1002001'),
- array('parent_id' => '1002', 'child_id' => '1002002'),
- array('parent_id' => '1003', 'child_id' => '1003001'),
- array('parent_id' => '1004', 'child_id' => '1004001')
- );
- $this->expected = array('1002001', '1002002');
- $this->actual = SC_Utils::sfGetUnderChildrenArray(
- $input_array,
- 'parent_id',
- 'child_id',
- '1002'
- );
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUnderChildrenArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfGetUnderChildrenArray()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetUnderChildrenArrayTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfGetUnderChildrenArray__与えられた親IDを持つ要素だけが抽出される() {
+ $input_array = array(
+ array('parent_id' => '1001', 'child_id' => '1001001'),
+ array('parent_id' => '1002', 'child_id' => '1002001'),
+ array('parent_id' => '1002', 'child_id' => '1002002'),
+ array('parent_id' => '1003', 'child_id' => '1003001'),
+ array('parent_id' => '1004', 'child_id' => '1004001')
+ );
+ $this->expected = array('1002001', '1002002');
+ $this->actual = SC_Utils::sfGetUnderChildrenArray(
+ $input_array,
+ 'parent_id',
+ 'child_id',
+ '1002'
+ );
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,70 +0,0 @@
-<?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::sfGetUniqRandomId()のテストクラス.
- * ランダムな生成結果をすべてテストすることはできないため,
- * 文字数とランダム性のみをチェックする.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfGetUniqRandomIdTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function test_prefix指定が無い場合_21文字のランダムな文字列が生成される() {
- $output1 = SC_Utils::sfGetUniqRandomId();
- $output2 = SC_Utils::sfGetUniqRandomId();
-
- $this->assertEquals(21, strlen($output1), '文字列1の長さ');
- $this->assertEquals(21, strlen($output2), '文字列2の長さ');
- $this->assertNotEquals($output1, $output2, '生成結果がランダムになる');
- }
-
- public function test_prefix指定がある場合_prefixのあとに21文字のランダムな文字列が生成される() {
- $output1 = SC_Utils::sfGetUniqRandomId('hello');
- $output2 = SC_Utils::sfGetUniqRandomId('hello');
-
- $this->assertEquals(26, strlen($output1), '文字列1の長さ');
- $this->assertEquals('hello', substr($output1, 0, 5), 'prefix1');
- $this->assertEquals(26, strlen($output2), '文字列2の長さ');
- $this->assertEquals('hello', substr($output2, 0, 5), 'prefix2');
- $this->assertNotEquals($output1, $output2, '生成結果がランダムになる');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfGetUniqRandomIdTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,70 @@
+<?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::sfGetUniqRandomId()のテストクラス.
+ * ランダムな生成結果をすべてテストすることはできないため,
+ * 文字数とランダム性のみをチェックする.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfGetUniqRandomIdTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function test_prefix指定が無い場合_21文字のランダムな文字列が生成される() {
+ $output1 = SC_Utils::sfGetUniqRandomId();
+ $output2 = SC_Utils::sfGetUniqRandomId();
+
+ $this->assertEquals(21, strlen($output1), '文字列1の長さ');
+ $this->assertEquals(21, strlen($output2), '文字列2の長さ');
+ $this->assertNotEquals($output1, $output2, '生成結果がランダムになる');
+ }
+
+ public function test_prefix指定がある場合_prefixのあとに21文字のランダムな文字列が生成される() {
+ $output1 = SC_Utils::sfGetUniqRandomId('hello');
+ $output2 = SC_Utils::sfGetUniqRandomId('hello');
+
+ $this->assertEquals(26, strlen($output1), '文字列1の長さ');
+ $this->assertEquals('hello', substr($output1, 0, 5), 'prefix1');
+ $this->assertEquals(26, strlen($output2), '文字列2の長さ');
+ $this->assertEquals('hello', substr($output2, 0, 5), 'prefix2');
+ $this->assertNotEquals($output1, $output2, '生成結果がランダムになる');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,73 +0,0 @@
-<?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::sfIsHTTPS()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfIsHTTPSTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfIsHTTPS_環境変数にSSLを示す値が入っている場合_trueが返る() {
- $_SERVER['HTTPS'] = 'on';
- $this->expected = true;
- $this->actual = SC_Utils::sfIsHTTPS();
-
- $this->verify();
- }
-
- public function testSfIsHTTPS_環境変数に非SSLを示す値が入っている場合_falseが返る() {
- $_SERVER['HTTPS'] = 'off';
- $this->expected = false;
- $this->actual = SC_Utils::sfIsHTTPS();
-
- $this->verify();
- }
-
- public function testSfIsHTTPS_環境変数に値が入っていない場合_falseが返る() {
- unset($_SERVER['HTTPS']);
- $this->expected = false;
- $this->actual = SC_Utils::sfIsHTTPS();
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsHTTPSTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfIsHTTPS()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfIsHTTPSTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfIsHTTPS_環境変数にSSLを示す値が入っている場合_trueが返る() {
+ $_SERVER['HTTPS'] = 'on';
+ $this->expected = true;
+ $this->actual = SC_Utils::sfIsHTTPS();
+
+ $this->verify();
+ }
+
+ public function testSfIsHTTPS_環境変数に非SSLを示す値が入っている場合_falseが返る() {
+ $_SERVER['HTTPS'] = 'off';
+ $this->expected = false;
+ $this->actual = SC_Utils::sfIsHTTPS();
+
+ $this->verify();
+ }
+
+ public function testSfIsHTTPS_環境変数に値が入っていない場合_falseが返る() {
+ unset($_SERVER['HTTPS']);
+ $this->expected = false;
+ $this->actual = SC_Utils::sfIsHTTPS();
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,87 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfIsIntTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfIsInt_0バイト文字列の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('');
-
- $this->verify('整数かどうか');
- }
-
- public function testSfIsInt_intの最大長より長い場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('10000000000');
-
- $this->verify('整数かどうか');
- }
-
- // TODO 要確認
- public function testSfIsInt_intの最大値ギリギリの場合_TRUEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('2147483647');
-
- $this->verify('整数かどうか');
- }
-
- // TODO 要確認
- public function testSfIsInt_intの最大値を超える場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('2147483648');
-
- $this->verify('整数かどうか');
- }
-
- public function testSfIsInt_数値でない場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('HELLO123');
-
- $this->verify('整数かどうか');
- }
-
- public function testSfIsInt_正の整数の場合_TRUEが返る() {
- $this->expected = TRUE;
- $this->actual = SC_Utils::sfIsInt('123456789');
-
- $this->verify('整数かどうか');
- }
-
- // TODO 要確認
- public function testSfIsInt_正の小数の場合_FALSEが返る() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsInt('123.456');
-
- $this->verify('整数かどうか');
- }
-
- public function testSfIsInt_負の整数の場合_TRUEが返る() {
- $this->expected = TRUE;
- $this->actual = SC_Utils::sfIsInt('-12345678');
-
- $this->verify('整数かどうか');
- }
-
- // TODO 要確認
- public function testSfIsInt_負の整数で桁数が最大の場合_TRUEが返る() {
- $this->expected = TRUE;
- $this->actual = SC_Utils::sfIsInt('-123456789');
-
- $this->verify('整数かどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,87 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfIsIntTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfIsInt_0バイト文字列の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('');
+
+ $this->verify('整数かどうか');
+ }
+
+ public function testSfIsInt_intの最大長より長い場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('10000000000');
+
+ $this->verify('整数かどうか');
+ }
+
+ // TODO 要確認
+ public function testSfIsInt_intの最大値ギリギリの場合_TRUEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('2147483647');
+
+ $this->verify('整数かどうか');
+ }
+
+ // TODO 要確認
+ public function testSfIsInt_intの最大値を超える場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('2147483648');
+
+ $this->verify('整数かどうか');
+ }
+
+ public function testSfIsInt_数値でない場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('HELLO123');
+
+ $this->verify('整数かどうか');
+ }
+
+ public function testSfIsInt_正の整数の場合_TRUEが返る() {
+ $this->expected = TRUE;
+ $this->actual = SC_Utils::sfIsInt('123456789');
+
+ $this->verify('整数かどうか');
+ }
+
+ // TODO 要確認
+ public function testSfIsInt_正の小数の場合_FALSEが返る() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsInt('123.456');
+
+ $this->verify('整数かどうか');
+ }
+
+ public function testSfIsInt_負の整数の場合_TRUEが返る() {
+ $this->expected = TRUE;
+ $this->actual = SC_Utils::sfIsInt('-12345678');
+
+ $this->verify('整数かどうか');
+ }
+
+ // TODO 要確認
+ public function testSfIsInt_負の整数で桁数が最大の場合_TRUEが返る() {
+ $this->expected = TRUE;
+ $this->actual = SC_Utils::sfIsInt('-123456789');
+
+ $this->verify('整数かどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,41 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfIsZeroFillingTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfIsZeroFilling_桁数が1の場合_FALSEを返す() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsZeroFilling('0');
-
- $this->verify('ゼロ詰めされているかどうか');
- }
-
- public function testSfIsZeroFilling_桁数が2以上で0埋めされていない場合_FALSEを返す() {
- $this->expected = FALSE;
- $this->actual = SC_Utils::sfIsZeroFilling('12');
-
- $this->verify('ゼロ詰めされているかどうか');
- }
-
- public function testSfIsZeroFilling_桁数が2以上で0埋めされている場合_TRUEを返す() {
- $this->expected = TRUE;
- $this->actual = SC_Utils::sfIsZeroFilling('01');
-
- $this->verify('ゼロ詰めされているかどうか');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfIsZeroFillingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,41 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfIsZeroFillingTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfIsZeroFilling_桁数が1の場合_FALSEを返す() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsZeroFilling('0');
+
+ $this->verify('ゼロ詰めされているかどうか');
+ }
+
+ public function testSfIsZeroFilling_桁数が2以上で0埋めされていない場合_FALSEを返す() {
+ $this->expected = FALSE;
+ $this->actual = SC_Utils::sfIsZeroFilling('12');
+
+ $this->verify('ゼロ詰めされているかどうか');
+ }
+
+ public function testSfIsZeroFilling_桁数が2以上で0埋めされている場合_TRUEを返す() {
+ $this->expected = TRUE;
+ $this->actual = SC_Utils::sfIsZeroFilling('01');
+
+ $this->verify('ゼロ詰めされているかどうか');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,75 +0,0 @@
-<?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::sfMakeHiddenArray()のテストクラス.
- * ※ソースコード上で使われている箇所がなく詳細仕様が不明なので、ソースコードに合わせて作成
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfMakeHiddenArrayest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfMakeHiddenArray__多段配列が1次元配列に変換される() {
- $input_array = array(
- 'vegetable' => '野菜',
- 'fruit' => array(
- 'apple' => 'りんご',
- 'banana' => 'バナナ'
- ),
- 'drink' => array(
- 'alcohol' => array(
- 'beer' => 'ビール'
- ),
- 'water' => '水'
- ),
- 'rice' => '米'
- );
- $this->expected = array(
- 'vegetable' => '野菜',
- 'fruit[apple]' => 'りんご',
- 'fruit[banana]' => 'バナナ',
- 'drink[alcohol][beer]' => 'ビール',
- 'drink[water]' => '水',
- 'rice' => '米'
- );
- $this->actual = SC_Utils::sfMakeHiddenArray($input_array);
- $this->verify();
- }
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMakeHiddenArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,75 @@
+<?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::sfMakeHiddenArray()のテストクラス.
+ * ※ソースコード上で使われている箇所がなく詳細仕様が不明なので、ソースコードに合わせて作成
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfMakeHiddenArrayest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfMakeHiddenArray__多段配列が1次元配列に変換される() {
+ $input_array = array(
+ 'vegetable' => '野菜',
+ 'fruit' => array(
+ 'apple' => 'りんご',
+ 'banana' => 'バナナ'
+ ),
+ 'drink' => array(
+ 'alcohol' => array(
+ 'beer' => 'ビール'
+ ),
+ 'water' => '水'
+ ),
+ 'rice' => '米'
+ );
+ $this->expected = array(
+ 'vegetable' => '野菜',
+ 'fruit[apple]' => 'りんご',
+ 'fruit[banana]' => 'バナナ',
+ 'drink[alcohol][beer]' => 'ビール',
+ 'drink[water]' => '水',
+ 'rice' => '米'
+ );
+ $this->actual = SC_Utils::sfMakeHiddenArray($input_array);
+ $this->verify();
+ }
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,63 +0,0 @@
-<?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::sfMbConvertEncoding()のテストクラス.
- * functionを1つ呼び出しているだけなので、エラーにならないことだけ確認する.
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfMbConvertEncodingTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfMbConvertEncoding_MS932の場合_エラーが起きない() {
- $input = 'あいうえお、今日は良い天気です。';
- $encode = 'MS932';
-
- $this->assertNotNull(SC_Utils::sfMbConvertEncoding($input, $encode), '変換結果');
- }
-
- public function testSfMbConvertEncoding_UTF8の場合_エラーが起きない() {
- $input = 'あいうえお、今日は良い天気です。';
- $encode = 'UTF8';
-
- $this->assertNotNull(SC_Utils::sfMbConvertEncoding($input, $encode), '変換結果');
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMbConvertEncodingTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,63 @@
+<?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::sfMbConvertEncoding()のテストクラス.
+ * functionを1つ呼び出しているだけなので、エラーにならないことだけ確認する.
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfMbConvertEncodingTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfMbConvertEncoding_MS932の場合_エラーが起きない() {
+ $input = 'あいうえお、今日は良い天気です。';
+ $encode = 'MS932';
+
+ $this->assertNotNull(SC_Utils::sfMbConvertEncoding($input, $encode), '変換結果');
+ }
+
+ public function testSfMbConvertEncoding_UTF8の場合_エラーが起きない() {
+ $input = 'あいうえお、今日は良い天気です。';
+ $encode = 'UTF8';
+
+ $this->assertNotNull(SC_Utils::sfMbConvertEncoding($input, $encode), '変換結果');
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,56 +0,0 @@
-<?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::sfMultiply()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfMultiplyTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfMultiply__掛け算の結果が返る() {
- $this->expected = 520;
- $this->actual = SC_Utils::sfMultiply(13, 40);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfMultiplyTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,56 @@
+<?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::sfMultiply()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfMultiplyTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfMultiply__掛け算の結果が返る() {
+ $this->expected = 520;
+ $this->actual = SC_Utils::sfMultiply(13, 40);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,70 +0,0 @@
-<?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::sfNoImageMainList()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfNoImageMainListTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfNoImageMainList_ファイル名が空の場合_デフォルトのファイル名が返る() {
- $this->expected = 'noimage_main_list.jpg';
- $this->actual = SC_Utils::sfNoImageMainList('');
-
- $this->verify();
- }
-
- public function testSfNoImageMainList_ディレクトリが指定されている場合_そのディレクトリ以下でデフォルトのファイル名が返る() {
- $this->expected = 'aaa/bbb/noimage_main_list.jpg';
- $this->actual = SC_Utils::sfNoImageMainList('aaa/bbb/');
-
- $this->verify();
- }
-
- public function testSfNoImageMainList_ファイル名が指定されている場合_指定されたファイル名が返る() {
- $this->expected = 'aaa/bbb/ccc.png';
- $this->actual = SC_Utils::sfNoImageMainList('aaa/bbb/ccc.png');
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainListTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,70 @@
+<?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::sfNoImageMainList()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfNoImageMainListTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfNoImageMainList_ファイル名が空の場合_デフォルトのファイル名が返る() {
+ $this->expected = 'noimage_main_list.jpg';
+ $this->actual = SC_Utils::sfNoImageMainList('');
+
+ $this->verify();
+ }
+
+ public function testSfNoImageMainList_ディレクトリが指定されている場合_そのディレクトリ以下でデフォルトのファイル名が返る() {
+ $this->expected = 'aaa/bbb/noimage_main_list.jpg';
+ $this->actual = SC_Utils::sfNoImageMainList('aaa/bbb/');
+
+ $this->verify();
+ }
+
+ public function testSfNoImageMainList_ファイル名が指定されている場合_指定されたファイル名が返る() {
+ $this->expected = 'aaa/bbb/ccc.png';
+ $this->actual = SC_Utils::sfNoImageMainList('aaa/bbb/ccc.png');
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,70 +0,0 @@
-<?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::sfNoImageMain()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfNoImageMainTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfNoImageMain_ファイル名が空の場合_デフォルトのファイル名が返る() {
- $this->expected = 'noimage_main.png';
- $this->actual = SC_Utils::sfNoImageMain('');
-
- $this->verify();
- }
-
- public function testSfNoImageMain_ディレクトリが指定されている場合_そのディレクトリ以下でデフォルトのファイル名が返る() {
- $this->expected = 'aaa/bbb/noimage_main.png';
- $this->actual = SC_Utils::sfNoImageMain('aaa/bbb/');
-
- $this->verify();
- }
-
- public function testSfNoImageMain_ファイル名が指定されている場合_指定されたファイル名が返る() {
- $this->expected = 'aaa/bbb/ccc.png';
- $this->actual = SC_Utils::sfNoImageMain('aaa/bbb/ccc.png');
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfNoImageMainTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,70 @@
+<?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::sfNoImageMain()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfNoImageMainTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfNoImageMain_ファイル名が空の場合_デフォルトのファイル名が返る() {
+ $this->expected = 'noimage_main.png';
+ $this->actual = SC_Utils::sfNoImageMain('');
+
+ $this->verify();
+ }
+
+ public function testSfNoImageMain_ディレクトリが指定されている場合_そのディレクトリ以下でデフォルトのファイル名が返る() {
+ $this->expected = 'aaa/bbb/noimage_main.png';
+ $this->actual = SC_Utils::sfNoImageMain('aaa/bbb/');
+
+ $this->verify();
+ }
+
+ public function testSfNoImageMain_ファイル名が指定されている場合_指定されたファイル名が返る() {
+ $this->expected = 'aaa/bbb/ccc.png';
+ $this->actual = SC_Utils::sfNoImageMain('aaa/bbb/ccc.png');
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,65 +0,0 @@
-<?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::sfPassLen()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_getSfPassLenTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfPassLen_入力が0の場合_0バイト文字列が返る() {
- $input = '';
- $this->expected = '';
- $this->actual = SC_Utils::sfPassLen($input);
-
- $this->verify();
- }
-
- public function testSfPassLen_入力が正の数の場合_入力と同じ文字数のアスタリスクが返る() {
- $input = 17;
- $this->expected = '*****************';
- $this->actual = SC_Utils::sfPassLen($input);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPassLenTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,65 @@
+<?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::sfPassLen()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_getSfPassLenTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfPassLen_入力が0の場合_0バイト文字列が返る() {
+ $input = '';
+ $this->expected = '';
+ $this->actual = SC_Utils::sfPassLen($input);
+
+ $this->verify();
+ }
+
+ public function testSfPassLen_入力が正の数の場合_入力と同じ文字数のアスタリスクが返る() {
+ $input = 17;
+ $this->expected = '*****************';
+ $this->actual = SC_Utils::sfPassLen($input);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,97 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用にデフォルトの丸め方法を指定
-define('POINT_RULE', 1); // 四捨五入
-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::sfPrePoint()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfPrePointTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfPrePoint_四捨五入の設定の場合_四捨五入された値が返る() {
- $rule = 1; // 四捨五入
-
- $this->expected = 10;
- $this->actual = SC_Utils::sfPrePoint(100, 9.5, $rule);
-
- $this->verify();
- }
-
- public function testSfPrePoint_切り捨ての設定の場合_切り捨てされた値が返る() {
- $rule = 2; // 切り捨て
-
- $this->expected = 9;
- $this->actual = SC_Utils::sfPrePoint(100, 9.5, $rule);
-
- $this->verify();
- }
-
- public function testSfPrePoint_切り上げの設定の場合_切り上げされた値が返る() {
- $rule = 3; // 切り上げ
-
- $this->expected = 10;
- $this->actual = SC_Utils::sfPrePoint(100, 9.4, $rule);
-
- $this->verify();
- }
-
- public function testSfPrePoint_存在しない選択肢の場合_切り上げされた値が返る() {
- $rule = 4; // 存在しない選択肢
-
- $this->expected = 10;
- $this->actual = SC_Utils::sfPrePoint(100, 9.4, $rule);
-
- $this->verify();
- }
-
- public function testSfPrePoint_丸め方法の指定がない場合_定数で指定された値が使われる() {
- $this->expected = array(9, 10);
- $this->actual = array(
- SC_Utils::sfPrePoint(100, 9.4),
- SC_Utils::sfPrePoint(100, 9.5)
- );
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfPrePointTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,97 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用にデフォルトの丸め方法を指定
+define('POINT_RULE', 1); // 四捨五入
+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::sfPrePoint()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfPrePointTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfPrePoint_四捨五入の設定の場合_四捨五入された値が返る() {
+ $rule = 1; // 四捨五入
+
+ $this->expected = 10;
+ $this->actual = SC_Utils::sfPrePoint(100, 9.5, $rule);
+
+ $this->verify();
+ }
+
+ public function testSfPrePoint_切り捨ての設定の場合_切り捨てされた値が返る() {
+ $rule = 2; // 切り捨て
+
+ $this->expected = 9;
+ $this->actual = SC_Utils::sfPrePoint(100, 9.5, $rule);
+
+ $this->verify();
+ }
+
+ public function testSfPrePoint_切り上げの設定の場合_切り上げされた値が返る() {
+ $rule = 3; // 切り上げ
+
+ $this->expected = 10;
+ $this->actual = SC_Utils::sfPrePoint(100, 9.4, $rule);
+
+ $this->verify();
+ }
+
+ public function testSfPrePoint_存在しない選択肢の場合_切り上げされた値が返る() {
+ $rule = 4; // 存在しない選択肢
+
+ $this->expected = 10;
+ $this->actual = SC_Utils::sfPrePoint(100, 9.4, $rule);
+
+ $this->verify();
+ }
+
+ public function testSfPrePoint_丸め方法の指定がない場合_定数で指定された値が使われる() {
+ $this->expected = array(9, 10);
+ $this->actual = array(
+ SC_Utils::sfPrePoint(100, 9.4),
+ SC_Utils::sfPrePoint(100, 9.5)
+ );
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,73 +0,0 @@
-<?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::sfRmDupSlash()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfRmDupSlashTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfRmDupSlash_非SSLの場合_スキーマ部分以外の重複スラッシュが1つになる() {
- $input = 'http://www.example.co.jp///aaa//bb/co.php';
- $this->expected = 'http://www.example.co.jp/aaa/bb/co.php';
- $this->actual = SC_Utils::sfRmDupSlash($input);
-
- $this->verify();
- }
-
- public function testSfRmDupSlash_SSLの場合_スキーマ部分以外の重複スラッシュが1つになる() {
- $input = 'https://www.example.co.jp///aaa//bb/co.php';
- $this->expected = 'https://www.example.co.jp/aaa/bb/co.php';
- $this->actual = SC_Utils::sfRmDupSlash($input);
-
- $this->verify();
- }
-
- public function testSfRmDupSlash_上記以外の場合_すべての重複スラッシュが1つになる() {
- $input = 'hoge//www.example.co.jp///aaa//bb/co.php';
- $this->expected = 'hoge/www.example.co.jp/aaa/bb/co.php';
- $this->actual = SC_Utils::sfRmDupSlash($input);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfRmDupSlashTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfRmDupSlash()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfRmDupSlashTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfRmDupSlash_非SSLの場合_スキーマ部分以外の重複スラッシュが1つになる() {
+ $input = 'http://www.example.co.jp///aaa//bb/co.php';
+ $this->expected = 'http://www.example.co.jp/aaa/bb/co.php';
+ $this->actual = SC_Utils::sfRmDupSlash($input);
+
+ $this->verify();
+ }
+
+ public function testSfRmDupSlash_SSLの場合_スキーマ部分以外の重複スラッシュが1つになる() {
+ $input = 'https://www.example.co.jp///aaa//bb/co.php';
+ $this->expected = 'https://www.example.co.jp/aaa/bb/co.php';
+ $this->actual = SC_Utils::sfRmDupSlash($input);
+
+ $this->verify();
+ }
+
+ public function testSfRmDupSlash_上記以外の場合_すべての重複スラッシュが1つになる() {
+ $input = 'hoge//www.example.co.jp///aaa//bb/co.php';
+ $this->expected = 'hoge/www.example.co.jp/aaa/bb/co.php';
+ $this->actual = SC_Utils::sfRmDupSlash($input);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,59 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-// テスト用に背景色を設定
-define('ERR_COLOR', 'blue');
-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::sfSetErrorStyle()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfSetErrorStyleTest extends Common_TestCase {
-
-
- protected function setUp() {
- // parent::setUp();
- }
-
- protected function tearDown() {
- // parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfSetErrorStyle__背景色変更用の文字列が返る() {
-
- $this->expected = 'style="background-color:blue"';
- $this->actual = SC_Utils::sfSetErrorStyle();
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSetErrorStyleTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,59 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+// テスト用に背景色を設定
+define('ERR_COLOR', 'blue');
+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::sfSetErrorStyle()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfSetErrorStyleTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ // parent::setUp();
+ }
+
+ protected function tearDown() {
+ // parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfSetErrorStyle__背景色変更用の文字列が返る() {
+
+ $this->expected = 'style="background-color:blue"';
+ $this->actual = SC_Utils::sfSetErrorStyle();
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,79 +0,0 @@
-<?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::sfSwapArray()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfSwapArrayTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfSwapArray_カラム名ありの指定の場合_キーに名称が入る() {
- $input_array = array(
- array('id' => '1001', 'name' => 'name1001'),
- array('id' => '1002', 'name' => 'name1002')
- );
-
- $this->expected = array(
- 'id' => array('1001', '1002'),
- 'name' => array('name1001', 'name1002')
- );
- $this->actual = SC_Utils::sfSwapArray($input_array);
-
- $this->verify();
- }
-
- public function testSfSwapArray_カラム名なしの指定の場合_キーに名称が入らない() {
- $input_array = array(
- array('id' => '1001', 'name' => 'name1001'),
- array('id' => '1002', 'name' => 'name1002')
- );
-
- $this->expected = array(
- array('1001', '1002'),
- array('name1001', 'name1002')
- );
- $this->actual = SC_Utils::sfSwapArray($input_array, false);
-
- $this->verify();
- }
-
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfSwapArrayTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,79 @@
+<?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::sfSwapArray()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfSwapArrayTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfSwapArray_カラム名ありの指定の場合_キーに名称が入る() {
+ $input_array = array(
+ array('id' => '1001', 'name' => 'name1001'),
+ array('id' => '1002', 'name' => 'name1002')
+ );
+
+ $this->expected = array(
+ 'id' => array('1001', '1002'),
+ 'name' => array('name1001', 'name1002')
+ );
+ $this->actual = SC_Utils::sfSwapArray($input_array);
+
+ $this->verify();
+ }
+
+ public function testSfSwapArray_カラム名なしの指定の場合_キーに名称が入らない() {
+ $input_array = array(
+ array('id' => '1001', 'name' => 'name1001'),
+ array('id' => '1002', 'name' => 'name1002')
+ );
+
+ $this->expected = array(
+ array('1001', '1002'),
+ array('name1001', 'name1002')
+ );
+ $this->actual = SC_Utils::sfSwapArray($input_array, false);
+
+ $this->verify();
+ }
+
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,52 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfTaxTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfTax_四捨五入の場合_四捨五入の結果になる() {
- $this->expected = array(1, 2);
- $this->actual[0] = SC_Utils::sfTax(140, 1, 1); // 1:四捨五入
- $this->actual[1] = SC_Utils::sfTax(150, 1, 1); // 1:四捨五入
-
- $this->verify('税額');
- }
-
- public function testSfTax_切り捨ての場合_切り捨ての結果になる() {
- $this->expected = array(2, 3);
- $this->actual[0] = SC_Utils::sfTax(140, 2, 2); // 2:切り捨て
- $this->actual[1] = SC_Utils::sfTax(150, 2, 2); // 2:切り捨て
-
- $this->verify('税額');
- }
-
- public function testSfTax_切り上げの場合_切り上げの結果になる() {
- $this->expected = array(2, 2);
- $this->actual[0] = SC_Utils::sfTax(140, 1, 3); // 3:切り上げ
- $this->actual[1] = SC_Utils::sfTax(150, 1, 3); // 3:切り上げ
-
- $this->verify('税額');
- }
-
- public function testSfTax_それ以外の場合_切り上げの結果になる() {
- $this->expected = array(2, 2);
- $this->actual[0] = SC_Utils::sfTax(140, 1, 4);
- $this->actual[1] = SC_Utils::sfTax(150, 1, 4);
-
- $this->verify('税額');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTaxTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,52 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfTaxTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfTax_四捨五入の場合_四捨五入の結果になる() {
+ $this->expected = array(1, 2);
+ $this->actual[0] = SC_Utils::sfTax(140, 1, 1); // 1:四捨五入
+ $this->actual[1] = SC_Utils::sfTax(150, 1, 1); // 1:四捨五入
+
+ $this->verify('税額');
+ }
+
+ public function testSfTax_切り捨ての場合_切り捨ての結果になる() {
+ $this->expected = array(2, 3);
+ $this->actual[0] = SC_Utils::sfTax(140, 2, 2); // 2:切り捨て
+ $this->actual[1] = SC_Utils::sfTax(150, 2, 2); // 2:切り捨て
+
+ $this->verify('税額');
+ }
+
+ public function testSfTax_切り上げの場合_切り上げの結果になる() {
+ $this->expected = array(2, 2);
+ $this->actual[0] = SC_Utils::sfTax(140, 1, 3); // 3:切り上げ
+ $this->actual[1] = SC_Utils::sfTax(150, 1, 3); // 3:切り上げ
+
+ $this->verify('税額');
+ }
+
+ public function testSfTax_それ以外の場合_切り上げの結果になる() {
+ $this->expected = array(2, 2);
+ $this->actual[0] = SC_Utils::sfTax(140, 1, 4);
+ $this->actual[1] = SC_Utils::sfTax(150, 1, 4);
+
+ $this->verify('税額');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,36 +0,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/Common_TestCase.php");
-/**
- *
- */
-class SC_Utils_sfTrimTest extends Common_TestCase {
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfTrim_文頭と途中にホワイトスペースがある場合_文頭だけが除去できる() {
- $this->expected = 'あ い うえ' . chr(0x0D) . 'お';
- // 0x0A=CR, 0x0d=LF
- $this->actual = SC_Utils::sfTrim(chr(0x0A) . chr(0x0D) . ' あ い うえ' . chr(0x0D) . 'お');
-
- $this->verify('トリム結果');
- }
-
- public function testSfTrim_途中と文末にホワイトスペースがある場合_文末だけが除去できる() {
- $this->expected = 'あ い うえ' . chr(0x0D) . 'お';
- // 0x0A=CR, 0x0d=LF
- $this->actual = SC_Utils::sfTrim('あ い うえ' .chr(0x0D) . 'お ' . chr(0x0A) . chr(0x0D));
-
- $this->verify('トリム結果');
- }
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,36 @@
+<?php
+
+$HOME = realpath(dirname(__FILE__)) . "/../../../..";
+require_once($HOME . "/tests/class/Common_TestCase.php");
+/**
+ *
+ */
+class SC_Utils_sfTrimTest extends Common_TestCase {
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfTrim_文頭と途中にホワイトスペースがある場合_文頭だけが除去できる() {
+ $this->expected = 'あ い うえ' . chr(0x0D) . 'お';
+ // 0x0A=CR, 0x0d=LF
+ $this->actual = SC_Utils::sfTrim(chr(0x0A) . chr(0x0D) . ' あ い うえ' . chr(0x0D) . 'お');
+
+ $this->verify('トリム結果');
+ }
+
+ public function testSfTrim_途中と文末にホワイトスペースがある場合_文末だけが除去できる() {
+ $this->expected = 'あ い うえ' . chr(0x0D) . 'お';
+ // 0x0A=CR, 0x0d=LF
+ $this->actual = SC_Utils::sfTrim('あ い うえ' .chr(0x0D) . 'お ' . chr(0x0A) . chr(0x0D));
+
+ $this->verify('トリム結果');
+ }
+
+}
+
削除: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php
===================================================================
--- branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,62 +0,0 @@
-<?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::sfTrimURL()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Utils_sfTrimURLTest extends Common_TestCase {
-
-
- protected function setUp() {
- parent::setUp();
- }
-
- protected function tearDown() {
- parent::tearDown();
- }
-
- /////////////////////////////////////////
- public function testSfTrimURL_URLがスラッシュで終わる場合_スラッシュが取り除かれる() {
- $input = 'http://www.example.co.jp/';
- $this->expected = 'http://www.example.co.jp';
- $this->actual = SC_Utils::sfTrimURL($input);
- $this->verify();
- }
-
- public function testSfTrimURL_URL末尾にスラッシュがない場合_文字列に変化がない() {
- $input = 'http://www.example.co.jp';
- $this->expected = $input;
- $this->actual = SC_Utils::sfTrimURL($input);
- $this->verify();
- }
- //////////////////////////////////////////
-
-}
-
コピーによる追加: branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php)
===================================================================
--- branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php (rev 0)
+++ branches/version-2_12-multilang/tests/class/util/SC_Utils/SC_Utils_sfTrimURLTest.php 2012-12-17 05:25:58 UTC (rev 22144)
@@ -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::sfTrimURL()のテストクラス.
+ *
+ *
+ * @author Hiroko Tamagawa
+ * @version $Id$
+ */
+class SC_Utils_sfTrimURLTest extends Common_TestCase {
+
+
+ protected function setUp() {
+ parent::setUp();
+ }
+
+ protected function tearDown() {
+ parent::tearDown();
+ }
+
+ /////////////////////////////////////////
+ public function testSfTrimURL_URLがスラッシュで終わる場合_スラッシュが取り除かれる() {
+ $input = 'http://www.example.co.jp/';
+ $this->expected = 'http://www.example.co.jp';
+ $this->actual = SC_Utils::sfTrimURL($input);
+ $this->verify();
+ }
+
+ public function testSfTrimURL_URL末尾にスラッシュがない場合_文字列に変化がない() {
+ $input = 'http://www.example.co.jp';
+ $this->expected = $input;
+ $this->actual = SC_Utils::sfTrimURL($input);
+ $this->verify();
+ }
+ //////////////////////////////////////////
+
+}
+
削除: branches/version-2_12-multilang/tests/phpunit.xml.base
===================================================================
--- branches/version-2_12-dev/tests/phpunit.xml.base 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/phpunit.xml.base 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<phpunit>
- <filter>
- <!-- カバレッジ測定の対象になるファイルを設定します。
- ローカルの環境に応じて編集してください -->
- <blacklist>
- <directory suffix=".php">/usr/local/lib</directory>
- <directory suffix=".php">../tests/class</directory>
- <directory suffix=".php">../data/module</directory>
- </blacklist>
- <whitelist addUncoveredFileFromWhitelist="true">
- <directory suffix=".php">data/class/</directory>
- <directory suffix=".php">data/class_extends/</directory>
- </whitelist>
- </filter>
-</phpunit>
コピーによる追加: branches/version-2_12-multilang/tests/phpunit.xml.base (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/phpunit.xml.base)
===================================================================
--- branches/version-2_12-multilang/tests/phpunit.xml.base (rev 0)
+++ branches/version-2_12-multilang/tests/phpunit.xml.base 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<phpunit>
+ <filter>
+ <!-- カバレッジ測定の対象になるファイルを設定します。
+ ローカルの環境に応じて編集してください -->
+ <blacklist>
+ <directory suffix=".php">/usr/local/lib</directory>
+ <directory suffix=".php">../tests/class</directory>
+ <directory suffix=".php">../data/module</directory>
+ </blacklist>
+ <whitelist addUncoveredFileFromWhitelist="true">
+ <directory suffix=".php">data/class/</directory>
+ <directory suffix=".php">data/class_extends/</directory>
+ </whitelist>
+ </filter>
+</phpunit>
削除: branches/version-2_12-multilang/tests/phpunit.xml.jenkins
===================================================================
--- branches/version-2_12-dev/tests/phpunit.xml.jenkins 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/phpunit.xml.jenkins 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<phpunit>
- <filter>
- <blacklist>
- <directory suffix=".php">/usr/local/lib</directory>
- <directory suffix=".php">../tests/class</directory>
- <directory suffix=".php">../data/module</directory>
- </blacklist>
- <whitelist addUncoveredFileFromWhitelist="true">
- <directory suffix=".php">data/class/</directory>
- <directory suffix=".php">data/class_extends/</directory>
- </whitelist>
- </filter>
-</phpunit>
コピーによる追加: branches/version-2_12-multilang/tests/phpunit.xml.jenkins (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/phpunit.xml.jenkins)
===================================================================
--- branches/version-2_12-multilang/tests/phpunit.xml.jenkins (rev 0)
+++ branches/version-2_12-multilang/tests/phpunit.xml.jenkins 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<phpunit>
+ <filter>
+ <blacklist>
+ <directory suffix=".php">/usr/local/lib</directory>
+ <directory suffix=".php">../tests/class</directory>
+ <directory suffix=".php">../data/module</directory>
+ </blacklist>
+ <whitelist addUncoveredFileFromWhitelist="true">
+ <directory suffix=".php">data/class/</directory>
+ <directory suffix=".php">data/class_extends/</directory>
+ </whitelist>
+ </filter>
+</phpunit>
削除: branches/version-2_12-multilang/tests/require.php.base
===================================================================
--- branches/version-2_12-dev/tests/require.php.base 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/require.php.base 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,10 +0,0 @@
-<?php
-$HOME = realpath(dirname(__FILE__)) . '/../';
-require_once "$HOME/html/require.php";
-// ローカルの環境に応じて追加・編集し、phpunitが使えるように設定してください。
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear');
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/local/lib/php');
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/lib/php/pear');
-set_include_path(get_include_path() . PATH_SEPARATOR . 'c:/pleiades/xampp/php/PEAR');
-require_once "$HOME/tests/class/Common_TestCase.php";
-?>
コピーによる追加: branches/version-2_12-multilang/tests/require.php.base (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/require.php.base)
===================================================================
--- branches/version-2_12-multilang/tests/require.php.base (rev 0)
+++ branches/version-2_12-multilang/tests/require.php.base 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,10 @@
+<?php
+$HOME = realpath(dirname(__FILE__)) . '/../';
+require_once "$HOME/html/require.php";
+// ローカルの環境に応じて追加・編集し、phpunitが使えるように設定してください。
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear');
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/local/lib/php');
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/lib/php/pear');
+set_include_path(get_include_path() . PATH_SEPARATOR . 'c:/pleiades/xampp/php/PEAR');
+require_once "$HOME/tests/class/Common_TestCase.php";
+?>
削除: branches/version-2_12-multilang/tests/require.php.jenkins
===================================================================
--- branches/version-2_12-dev/tests/require.php.jenkins 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/require.php.jenkins 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,8 +0,0 @@
-<?php
-$HOME = realpath(dirname(__FILE__)) . '/../';
-require_once "$HOME/html/require.php";
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear');
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/local/lib/php');
-set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/lib/php/pear');
-require_once "$HOME/tests/class/Common_TestCase.php";
-?>
コピーによる追加: branches/version-2_12-multilang/tests/require.php.jenkins (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/require.php.jenkins)
===================================================================
--- branches/version-2_12-multilang/tests/require.php.jenkins (rev 0)
+++ branches/version-2_12-multilang/tests/require.php.jenkins 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,8 @@
+<?php
+$HOME = realpath(dirname(__FILE__)) . '/../';
+require_once "$HOME/html/require.php";
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear');
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/local/lib/php');
+set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/lib/php/pear');
+require_once "$HOME/tests/class/Common_TestCase.php";
+?>
削除: branches/version-2_12-multilang/tests/ruleset.xml
===================================================================
--- branches/version-2_12-dev/tests/ruleset.xml 2012-12-16 16:27:59 UTC (rev 22143)
+++ branches/version-2_12-multilang/tests/ruleset.xml 2012-12-17 05:25:58 UTC (rev 22144)
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<ruleset name="Sample">
- <description>A sample coding standard</description>
-
- <!-- Include all sniffs in the PEAR standard -->
- <rule ref="Zend">
- <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
- <exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps"/>
- <exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine"/>
- </rule>
-
- <!-- Include some specific sniffs -->
- <rule ref="Generic.ControlStructures.InlineControlStructure"/>
- <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
-
- <!-- Change the settings of the Line Length sniff -->
- <rule ref="Generic.Files.LineLength">
- <properties>
- <property name="lineLimit" value="80"/>
- <property name="absoluteLineLimit" value="200"/>
- </properties>
- </rule>
-
- <!-- Change both Line Length messages -->
- <rule ref="Generic.Files.LineLength.MaxExceeded">
- <message>Line longer than the max of %s; has %s chars</message>
- </rule>
- <rule ref="Generic.Files.LineLength.TooLong">
- <message>Line longer than %s chars; has %s chars</message>
- </rule>
-
- <!-- Disable internal message for missing code and short open tags -->
- <rule ref="Internal.NoCodeFound">
- <severity>0</severity>
- </rule>
-</ruleset>
-
コピーによる追加: branches/version-2_12-multilang/tests/ruleset.xml (コピー元: リビジョン 22143, branches/version-2_12-dev/tests/ruleset.xml)
===================================================================
--- branches/version-2_12-multilang/tests/ruleset.xml (rev 0)
+++ branches/version-2_12-multilang/tests/ruleset.xml 2012-12-17 05:25:58 UTC (rev 22144)
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<ruleset name="Sample">
+ <description>A sample coding standard</description>
+
+ <!-- Include all sniffs in the PEAR standard -->
+ <rule ref="Zend">
+ <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
+ <exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps"/>
+ <exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine"/>
+ </rule>
+
+ <!-- Include some specific sniffs -->
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
+ <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+
+ <!-- Change the settings of the Line Length sniff -->
+ <rule ref="Generic.Files.LineLength">
+ <properties>
+ <property name="lineLimit" value="80"/>
+ <property name="absoluteLineLimit" value="200"/>
+ </properties>
+ </rule>
+
+ <!-- Change both Line Length messages -->
+ <rule ref="Generic.Files.LineLength.MaxExceeded">
+ <message>Line longer than the max of %s; has %s chars</message>
+ </rule>
+ <rule ref="Generic.Files.LineLength.TooLong">
+ <message>Line longer than %s chars; has %s chars</message>
+ </rule>
+
+ <!-- Disable internal message for missing code and short open tags -->
+ <rule ref="Internal.NoCodeFound">
+ <severity>0</severity>
+ </rule>
+</ruleset>
+
Svn-src-all メーリングリストの案内