diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cb2c98..3324a4a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ ### Fixed - Fixed duplicate test name error when no test name is given yet. ([#61](https://github.com/pestphp/pest-intellij/pull/61)) - Fixed finding tests with namespace at the top. ([#65](https://github.com/pestphp/pest-intellij/pull/65)) +- Fixed allow location to be null in location provider. ([#68](https://github.com/pestphp/pest-intellij/pull/68)) ### Security ## [0.3.3] diff --git a/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt b/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt index 97bbffe4..ef943ceb 100644 --- a/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt +++ b/src/main/kotlin/com/pestphp/pest/configuration/PestLocationProvider.kt @@ -71,6 +71,6 @@ class PestLocationProvider : SMTestLocator { return file } - return (file as PhpFile).getPestTests().first { it.getPestTestName() == testName } + return (file as PhpFile).getPestTests().firstOrNull { it.getPestTestName() == testName } } }