Skip to content

Commit eca954e

Browse files
committed
ユニットテストの構成を調整
composer security alert に引っかかっていたため
1 parent d8e627d commit eca954e

File tree

3 files changed

+774
-590
lines changed

3 files changed

+774
-590
lines changed

plugins/baser-core/tests/TestCase/Utility/BcComposerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,16 @@ public function testSelfUpdate()
256256
public function testSetupComposerForDistribution()
257257
{
258258
// composer.json をバックアップ
259-
$srcComposerJsonPath = __DIR__ . DS . 'assets' . DS . 'composer-5.1.1.json';
260-
$srcComposerLockPath = __DIR__ . DS . 'assets' . DS . 'composer-5.1.1.lock';
259+
$srcComposerJsonPath = __DIR__ . DS . 'assets' . DS . 'composer-5.2.0.json';
260+
$srcComposerLockPath = __DIR__ . DS . 'assets' . DS . 'composer-5.2.0.lock';
261261
$composerJson = TMP_TESTS . 'composer.json';
262262
$composerLock = TMP_TESTS . 'composer.lock';
263263
copy($srcComposerJsonPath, $composerJson);
264264
copy($srcComposerLockPath, $composerLock);
265265

266266
// 実行
267267
BcComposer::setup('', TMP_TESTS);
268-
BcComposer::setupComposerForDistribution('5.1.1');
268+
BcComposer::setupComposerForDistribution('5.2.0');
269269
$file = new BcFile($composerJson);
270270
$data = $file->read();
271271
$this->assertNotFalse(strpos($data, '"baserproject/baser-core": '));

plugins/baser-core/tests/TestCase/Utility/assets/composer-5.1.1.json renamed to plugins/baser-core/tests/TestCase/Utility/assets/composer-5.2.0.json

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
"cakephp/plugin-installer": "^2.0",
1919
"doctrine/annotations": "^1.12",
2020
"firebase/php-jwt": "6.1.0",
21-
"mobiledetect/mobiledetectlib": "^3.74"
21+
"josegonzalez/dotenv": "^4.0",
22+
"mobiledetect/mobiledetectlib": "^3.74",
23+
"psr/http-message": "^1.0"
2224
},
2325
"require-dev": {
2426
"ext-xdebug": "*",
2527
"cakephp/bake": "^3.0.0",
2628
"cakephp/cakephp-codesniffer": "^5.0",
2729
"cakephp/debug_kit": "^5.0.0",
28-
"josegonzalez/dotenv": "^4.0",
2930
"phpunit/phpunit": "10.5.31",
3031
"symplify/monorepo-builder": "^11.2",
3132
"vierge-noire/cakephp-fixture-factories": "^3.0",
@@ -47,6 +48,7 @@
4748
"BcMail\\": "plugins/bc-mail/src/",
4849
"BcPluginSample\\": "plugins/BcPluginSample/src/",
4950
"BcSearchIndex\\": "plugins/bc-search-index/src/",
51+
"BcSeo\\": "plugins/bc-seo/src/",
5052
"BcThemeConfig\\": "plugins/bc-theme-config/src/",
5153
"BcThemeFile\\": "plugins/bc-theme-file/src/",
5254
"BcThemeSample\\": "plugins/BcThemeSample/src/",
@@ -66,6 +68,7 @@
6668
"BcInstaller\\Test\\": "plugins/bc-installer/tests/",
6769
"BcMail\\Test\\": "plugins/bc-mail/tests/",
6870
"BcSearchIndex\\Test\\": "plugins/bc-search-index/tests/",
71+
"BcSeo\\Test\\": "plugins/bc-seo/tests/",
6972
"BcThemeConfig\\Test\\": "plugins/bc-theme-config/tests/",
7073
"BcThemeFile\\Test\\": "plugins/bc-theme-file/tests/",
7174
"BcUploader\\Test\\": "plugins/bc-uploader/tests/",
@@ -83,7 +86,7 @@
8386
"cs-check": "phpcs --colors -p src/ tests/",
8487
"cs-fix": "phpcbf --colors -p src/ tests/",
8588
"stan": "phpstan analyse",
86-
"install": [
89+
"app-install": [
8790
"composer install --no-plugins",
8891
"bin/cake setup install",
8992
"bin/cake install https://localhost [email protected] baserCMS1234 basercms --host bc-db --username root --password root"
@@ -108,23 +111,24 @@
108111
}
109112
},
110113
"replace": {
111-
"baserproject/baser-core": "5.1.1",
112-
"baserproject/bc-admin-third": "5.1.1",
113-
"baserproject/bc-blog": "5.1.1",
114-
"baserproject/bc-column": "5.1.1",
115-
"baserproject/bc-content-link": "5.1.1",
116-
"baserproject/bc-custom-content": "5.1.1",
117-
"baserproject/bc-editor-template": "5.1.1",
118-
"baserproject/bc-favorite": "5.1.1",
119-
"baserproject/bc-front": "5.1.1",
120-
"baserproject/bc-installer": "5.1.1",
121-
"baserproject/bc-mail": "5.1.1",
122-
"baserproject/bc-plugin-sample": "5.1.1",
123-
"baserproject/bc-search-index": "5.1.1",
124-
"baserproject/bc-theme-config": "5.1.1",
125-
"baserproject/bc-theme-file": "5.1.1",
126-
"baserproject/bc-theme-sample": "5.1.1",
127-
"baserproject/bc-uploader": "5.1.1",
128-
"baserproject/bc-widget-area": "5.1.1"
114+
"baserproject/baser-core": "5.2.0",
115+
"baserproject/bc-admin-third": "5.2.0",
116+
"baserproject/bc-blog": "5.2.0",
117+
"baserproject/bc-column": "5.2.0",
118+
"baserproject/bc-content-link": "5.2.0",
119+
"baserproject/bc-custom-content": "5.2.0",
120+
"baserproject/bc-editor-template": "5.2.0",
121+
"baserproject/bc-favorite": "5.2.0",
122+
"baserproject/bc-front": "5.2.0",
123+
"baserproject/bc-installer": "5.2.0",
124+
"baserproject/bc-mail": "5.2.0",
125+
"baserproject/bc-plugin-sample": "5.2.0",
126+
"baserproject/bc-search-index": "5.2.0",
127+
"baserproject/bc-seo": "5.2.0",
128+
"baserproject/bc-theme-config": "5.2.0",
129+
"baserproject/bc-theme-file": "5.2.0",
130+
"baserproject/bc-theme-sample": "5.2.0",
131+
"baserproject/bc-uploader": "5.2.0",
132+
"baserproject/bc-widget-area": "5.2.0"
129133
}
130134
}

0 commit comments

Comments
 (0)