diff --git a/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt b/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt index bc85d8d1..1533fde0 100644 --- a/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt +++ b/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt @@ -18,7 +18,7 @@ import com.pestphp.pest.runner.LocationInfo /** * Adds support for goto test from test results. */ -class PestLocationProvider(private val pathMapper: PhpPathMapper) : SMTestLocator { +class PestLocationProvider(private val pathMapper: PhpPathMapper, private val project: Project) : SMTestLocator { private val protocolId = "pest_qn" private val phpUnitLocationProvider = PhpUnitQualifiedNameLocationProvider.create(pathMapper) @@ -52,7 +52,7 @@ class PestLocationProvider(private val pathMapper: PhpPathMapper) : SMTestLocato val location = link.split("::") - val file = this.pathMapper.getLocalFile(location[0]) + val file = this.pathMapper.getLocalFile("${this.project.basePath}/${location[0]}") if (location.size == 1) { return file?.let { LocationInfo(it, null) } diff --git a/src/main/kotlin/com/pestphp/pest/configuration/PestRunConfiguration.kt b/src/main/kotlin/com/pestphp/pest/configuration/PestRunConfiguration.kt index f6841f11..530a3a93 100644 --- a/src/main/kotlin/com/pestphp/pest/configuration/PestRunConfiguration.kt +++ b/src/main/kotlin/com/pestphp/pest/configuration/PestRunConfiguration.kt @@ -19,7 +19,6 @@ import com.jetbrains.php.PhpBundle import com.jetbrains.php.config.commandLine.PhpCommandLinePathProcessor import com.jetbrains.php.config.commandLine.PhpCommandSettings import com.jetbrains.php.config.interpreters.PhpInterpreter -import com.jetbrains.php.phpunit.PhpUnitQualifiedNameLocationProvider import com.jetbrains.php.run.PhpRunUtil import com.jetbrains.php.run.remote.PhpRemoteInterpreterManager import com.jetbrains.php.testFramework.PhpTestFrameworkConfiguration @@ -110,7 +109,7 @@ class PestRunConfiguration(project: Project, factory: ConfigurationFactory) : Ph return PestConsoleProperties( this, executor, - PestLocationProvider(pathMapper) + PestLocationProvider(pathMapper, this.project) ) }