Skip to content

Commit

Permalink
Fix running the tests on IntelliJ 2024.1 EAP.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Feb 29, 2024
1 parent 12c4fec commit 735dac2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ import com.intellij.compat.application.options.codeStyle.cache.CodeStyleCachingS
import uk.co.reecedunn.intellij.plugin.core.extensions.registerExtensionPointBean
import uk.co.reecedunn.intellij.plugin.core.extensions.registerServiceInstance
import com.intellij.lang.LanguageASTFactory
import com.intellij.lang.injection.InjectedLanguageManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.roots.ProjectRootManager
import com.intellij.pom.PomModel
import com.intellij.pom.tree.TreeAspect
import com.intellij.psi.PsiFile
import uk.co.reecedunn.intellij.plugin.core.tests.injecton.MockInjectedLanguageManager
import uk.co.reecedunn.intellij.plugin.core.tests.module.MockModuleManager
import uk.co.reecedunn.intellij.plugin.core.tests.parser.ParsingTestCase
import uk.co.reecedunn.intellij.plugin.core.tests.pom.core.MockPomModel
Expand Down Expand Up @@ -54,5 +56,7 @@ abstract class ParserTestCase : ParsingTestCase<PsiFile>(null, XPathParserDefini
app.registerExtensionPointBean(
XpmFunctionProvider.EP_NAME, XpmFunctionProviderBean::class.java, pluginDisposable
)

project.registerServiceInstance(InjectedLanguageManager::class.java, MockInjectedLanguageManager())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ import com.intellij.compat.application.options.codeStyle.cache.CodeStyleCachingS
import uk.co.reecedunn.intellij.plugin.core.extensions.registerExtensionPointBean
import uk.co.reecedunn.intellij.plugin.core.extensions.registerServiceInstance
import com.intellij.lang.LanguageASTFactory
import com.intellij.lang.injection.InjectedLanguageManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.roots.ProjectRootManager
import com.intellij.pom.PomModel
import com.intellij.pom.tree.TreeAspect
import uk.co.reecedunn.intellij.plugin.core.tests.injecton.MockInjectedLanguageManager
import uk.co.reecedunn.intellij.plugin.core.tests.module.MockModuleManager
import uk.co.reecedunn.intellij.plugin.core.tests.parser.ParsingTestCase
import uk.co.reecedunn.intellij.plugin.core.tests.pom.core.MockPomModel
Expand Down Expand Up @@ -88,6 +90,8 @@ abstract class ParserTestCase :
app.registerExtensionPointBean(
XpmFunctionDecorator.EP_NAME, XpmFunctionDecoratorBean::class.java, pluginDisposable
)

project.registerServiceInstance(InjectedLanguageManager::class.java, MockInjectedLanguageManager())
}

protected val settings: XQueryProjectSettings
Expand Down

0 comments on commit 735dac2

Please sign in to comment.