compileContentForTest

fun compileContentForTest(content: String, filename: String): KtFile
fun compileContentForTest(content: String, path: Path = Path("/").absolute().resolve("Test.kt")): KtFile

Use this method if you define a kt file/class as a plain string in your test.