Skip to content

Commit 7ff40cd

Browse files
committed
test: laravel10, github actions, Test file "no_manual"|"no_api_test" not found エラー対応3
1 parent aab3adb commit 7ff40cd

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ FACE_AI_API_KEY="${COMMON_API_KEY}"
171171
#DUSK_DRIVER_URL=
172172

173173
# Do not create manuals in Dusk.
174-
#DUSK_NO_MANUAL=true
174+
#DUSK_NO_MANUAL_ALL=true
175175

176176
# Do not run API tests in Dusk.
177-
#DUSK_NO_API_TEST=true
177+
#DUSK_NO_API_TEST_ALL=true
178178

179179
# dusk use uploads dir.
180180
#UPLOADS_DIRECTORY_BASE=uploads_dusk/

tests/DuskTestCase.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ protected function setUp(): void
121121
}
122122

123123
// Laravel 10対応(phpunit 10.x) dusk実行時のコマンドライン引数はテストクラスのパスと認識されるため、envで対応
124-
// .envの DUSK_NO_MANUAL に何か値が指定されていた場合は、マニュアル作成しない。
125-
if (env('DUSK_NO_MANUAL')) {
124+
// .envの DUSK_NO_MANUAL_ALL に何か値が指定されていた場合は、マニュアル作成しない。
125+
if (env('DUSK_NO_MANUAL_ALL')) {
126126
$this->no_manual = true;
127127
}
128128

129-
// .envの DUSK_NO_API_TEST に何か値が指定されていた場合は、APIテストを実行しない。
130-
if (env('DUSK_NO_API_TEST')) {
129+
// .envの DUSK_NO_API_TEST_ALL に何か値が指定されていた場合は、APIテストを実行しない。
130+
if (env('DUSK_NO_API_TEST_ALL')) {
131131
$this->no_api_test = true;
132132
}
133133

@@ -569,6 +569,11 @@ public function putManualData($img_args = null, $method = null, $sort = 0, $leve
569569
*/
570570
public function putManualTemplateData($frame, $category, $test_path, $plugin, $templates)
571571
{
572+
// マニュアル用データ出力がOFF の場合は、出力せずに戻る。
573+
if ($this->no_manual) {
574+
return;
575+
}
576+
572577
// 画像関係パス
573578
$img_args = "";
574579

0 commit comments

Comments
 (0)