Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

=& SC_Query_Exの修正 #1093

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion html/admin/load_module_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if (!empty($module_id) && is_numeric($module_id)) {
GC_Utils_Ex::gfPrintLog('loading module ====> module_id = ' . $module_id);

$objQuery =& SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$arrRet = $objQuery->select('module_code', 'dtb_module', 'module_id = ?', array($module_id));

if (isset($arrRet[0]['module_code'])) {
Expand Down
14 changes: 7 additions & 7 deletions html/test/upgrade/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
);

switch (getMode()) {
case 'products_list':
displayProductsList();
break;
case 'products_list':
displayProductsList();
break;

default:
displayProductsList();
break;
default:
displayProductsList();
break;
}

/**
Expand Down Expand Up @@ -106,7 +106,7 @@ function updateModuleTable($arrProductsList)
{
$table = 'dtb_module';
$where = 'module_id = ?';
$objQuery =& SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();

$objQuery->begin();
foreach ($arrProductsList as $arrProduct) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../../';
require_once $HOME.'/tests/class/Common_TestCase.php';
$HOME = realpath(__DIR__) . '/../../../../';
require_once $HOME . '/tests/class/Common_TestCase.php';

class SC_Helper_Address_TestBase extends Common_TestCase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void
*/
protected function setUpAddress()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
// シーケンス初期化

$kiyaku = [
Expand All @@ -42,7 +42,7 @@ protected function setUpAddress()
'fax01' => '111',
'fax02' => '1111',
'fax03' => '1111',
],
],
[
'other_deliv_id' => '1001',
'customer_id' => '1',
Expand All @@ -61,8 +61,8 @@ protected function setUpAddress()
'fax01' => '111',
'fax02' => '1111',
'fax03' => '1111',
],
];
],
];

$this->objQuery->delete('dtb_other_deliv');
foreach ($kiyaku as $key => $item) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php';

class SC_Helper_Address_deleteAddressTest extends SC_Helper_Address_TestBase
{
Expand All @@ -25,7 +25,7 @@ public function testdeleteAddressTest会員の登録配送先を削除する()
$customer_id = 1;
$this->expected = null;
$this->objAddress->deleteAddress($other_deliv_id, $customer_id);
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$select = '*';
$from = 'dtb_other_deliv';
$where = 'other_deliv_id = ? AND customer_id = ?';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php';

class SC_Helper_Address_registAddressTest extends SC_Helper_Address_TestBase
{
Expand All @@ -22,7 +22,7 @@ protected function tearDown(): void
/*
public function testregistAddressTest_顧客idが無い場合_システムエラーを返す()
{
$objQuery =& SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpAddress();
//$this->expected = "1";
$this->objAddress->registAddress(null);
Expand Down Expand Up @@ -56,7 +56,7 @@ public function testregistAddressTest_会員の登録配送先を追加する()
'fax03' => '1114',
'country_id' => null
);
$objQuery =& SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->expected = '1002';
$this->objAddress->registAddress($arrSql);
$col = 'other_deliv_id';
Expand Down Expand Up @@ -96,7 +96,7 @@ public function testregistAddressTest会員の登録配送先を更新する()
'company_name' => null,
'zipcode' => null,
];
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->objAddress->registAddress($arrSql);

$this->expected = $arrSql;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../../';
require_once $HOME.'/tests/class/Common_TestCase.php';
$HOME = realpath(__DIR__) . '/../../../../';
require_once $HOME . '/tests/class/Common_TestCase.php';

class SC_Helper_Kiyaku_TestBase extends Common_TestCase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void
*/
protected function setUpKiyaku()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();

$kiyaku = [
[
Expand All @@ -32,7 +32,7 @@ protected function setUpKiyaku()
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '0',
],
],
[
'kiyaku_id' => '1001',
'kiyaku_title' => 'test2',
Expand All @@ -42,7 +42,7 @@ protected function setUpKiyaku()
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '0',
],
],
[
'kiyaku_id' => '1002',
'kiyaku_title' => 'test3',
Expand All @@ -52,8 +52,8 @@ protected function setUpKiyaku()
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '1',
],
];
],
];

$this->objQuery->delete('dtb_kiyaku');
foreach ($kiyaku as $key => $item) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';

class SC_Helper_Kiyaku_deleteKiyakuTest extends SC_Helper_Kiyaku_TestBase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void

public function testdeleteKiyakuTest削除ができた場合DelFlgの1を返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$kiyaku_id = 1001;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';

class SC_Helper_Kiyaku_getKiyakuTest extends SC_Helper_Kiyaku_TestBase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void

public function testgetKiyakuTest規約情報を取得できた場合規約のarrayを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$has_deleted = false;
$kiyaku_id = 1000;
Expand All @@ -34,15 +34,15 @@ public function testgetKiyakuTest規約情報を取得できた場合規約のar
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '0',
];
];

$this->actual = $this->objKiyaku->getKiyaku($kiyaku_id, $has_deleted);
$this->verify('規約詳細取得');
}

public function testgetKiyakuTest規約情報を規約idから取得する際削除された規約を指定した場合Nullを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$has_deleted = false;
$kiyaku_id = 1002;
Expand All @@ -55,21 +55,21 @@ public function testgetKiyakuTest規約情報を規約idから取得する際削

public function testgetKiyakuTest削除された情報を含む規約情報を規約idから取得する際削除された規約を指定した場合Nullを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$has_deleted = true;
$kiyaku_id = 1002;
// 期待値
$this->expected = [
'kiyaku_id' => '1002',
'kiyaku_title' => 'test3',
'kiyaku_text' => 'test_text',
'rank' => '10',
'creator_id' => '0',
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '1',
];
'kiyaku_id' => '1002',
'kiyaku_title' => 'test3',
'kiyaku_text' => 'test_text',
'rank' => '10',
'creator_id' => '0',
'create_date' => '2000-01-01 00:00:00',
'update_date' => '2000-01-01 00:00:00',
'del_flg' => '1',
];

$this->actual = $this->objKiyaku->getKiyaku($kiyaku_id, $has_deleted);
$this->verify('規約詳細取得');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';

class SC_Helper_Kiyaku_getListTest extends SC_Helper_Kiyaku_TestBase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void

public function testgetListTest削除した商品も含んだ一覧を取得できた場合一覧のarrayを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$has_deleted = true;
// 期待値
Expand All @@ -29,26 +29,26 @@ public function testgetListTest削除した商品も含んだ一覧を取得で
'kiyaku_id' => '1000',
'kiyaku_title' => 'test1',
'kiyaku_text' => 'test_text',
],
],
[
'kiyaku_id' => '1001',
'kiyaku_title' => 'test2',
'kiyaku_text' => 'test_text2',
],
],
[
'kiyaku_id' => '1002',
'kiyaku_title' => 'test3',
'kiyaku_text' => 'test_text',
],
];
],
];

$this->actual = $this->objKiyaku->getList($has_deleted);
$this->verify('規約一覧取得');
}

public function testgetListTest一覧を取得できた場合削除した商品は取得しない一覧のarrayを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$has_deleted = false;
// 期待値
Expand All @@ -57,13 +57,13 @@ public function testgetListTest一覧を取得できた場合削除した商品
'kiyaku_id' => '1000',
'kiyaku_title' => 'test1',
'kiyaku_text' => 'test_text',
],
],
[
'kiyaku_id' => '1001',
'kiyaku_title' => 'test2',
'kiyaku_text' => 'test_text2',
],
];
],
];

$this->actual = $this->objKiyaku->getList($has_deleted);
$this->verify('規約一覧取得');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';

class SC_Helper_Kiyaku_rankDownTest extends SC_Helper_Kiyaku_TestBase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void

public function testrankDownTestランクダウンができた場合ランクを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$kiyaku_id = 1000;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$HOME = realpath(__DIR__).'/../../../..';
require_once $HOME.'/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';
$HOME = realpath(__DIR__) . '/../../../..';
require_once $HOME . '/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_TestBase.php';

class SC_Helper_Kiyaku_rankUpTest extends SC_Helper_Kiyaku_TestBase
{
Expand All @@ -20,7 +20,7 @@ protected function tearDown(): void

public function testrankUpTestランクアップができた場合ランクを返す()
{
$objQuery = &SC_Query_Ex::getSingletonInstance();
$objQuery = SC_Query_Ex::getSingletonInstance();
$this->setUpKiyaku();
$kiyaku_id = 1001;

Expand Down
Loading
Loading