Skip to content

Commit a6e549b

Browse files
committed
feat: pass --path filter when run tests
1 parent b793410 commit a6e549b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/kotlin/com/github/xepozz/testo/tests/run/TestoRunConfigurationHandler.kt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class TestoRunConfigurationHandler : PhpTestRunConfigurationHandler {
3131
workingDirectory: String
3232
) {
3333
println("runType: $type, $workingDirectory")
34+
35+
phpCommandSettings.addArgument("--suite=$type")
3436
}
3537

3638
override fun runDirectory(
@@ -40,9 +42,9 @@ class TestoRunConfigurationHandler : PhpTestRunConfigurationHandler {
4042
workingDirectory: String
4143
) {
4244
println("runDirectory: $directory")
43-
if (!directory.isEmpty()) {
44-
phpCommandSettings.addArgument("--filter=$directory")
45-
}
45+
if (directory.isEmpty()) return
46+
47+
phpCommandSettings.addArgument("--path=$directory")
4648
}
4749

4850
override fun runFile(
@@ -52,9 +54,9 @@ class TestoRunConfigurationHandler : PhpTestRunConfigurationHandler {
5254
workingDirectory: String
5355
) {
5456
println("runFile: $file")
55-
if (!file.isEmpty()) {
56-
phpCommandSettings.addArgument("--filter=$file")
57-
}
57+
if (file.isEmpty()) return
58+
59+
phpCommandSettings.addArgument("--path=$file")
5860
}
5961

6062
override fun runMethod(
@@ -67,6 +69,7 @@ class TestoRunConfigurationHandler : PhpTestRunConfigurationHandler {
6769
println("runMethod: $file, $methodName")
6870
if (file.isEmpty()) return
6971

72+
phpCommandSettings.addArgument("--path=$file")
7073
phpCommandSettings.addArgument("--filter=$methodName")
7174
}
7275
}

0 commit comments

Comments
 (0)