void () { myFixture.configureByFile(getTestName(true) + ".yml"); final int offset = myFixture.getCaretOffset(); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(offset); final YAMLScalar scalarElement = PsiTreeUtil.getNonStrictParentOfType(elementAtCaret, YAMLScalar.class); assertNotNull(scalarElement); assertSameLinesWithFile(getTestDataPath() + getTestName(true) + ".txt", scalarElement.getTextValue(), false); }