Lines 52-57
Link Here
|
52 |
import org.netbeans.modules.html.editor.lib.api.HtmlVersion; |
52 |
import org.netbeans.modules.html.editor.lib.api.HtmlVersion; |
53 |
import org.netbeans.modules.php.editor.PHPTestBase; |
53 |
import org.netbeans.modules.php.editor.PHPTestBase; |
54 |
import org.netbeans.modules.php.editor.lexer.PHPTokenId; |
54 |
import org.netbeans.modules.php.editor.lexer.PHPTokenId; |
|
|
55 |
import org.netbeans.modules.php.editor.parser.GSFPHPParser; |
55 |
import org.openide.filesystems.FileObject; |
56 |
import org.openide.filesystems.FileObject; |
56 |
|
57 |
|
57 |
/** |
58 |
/** |
Lines 84-89
Link Here
|
84 |
HtmlVersion.DEFAULT_VERSION_UNIT_TESTS_OVERRIDE = HtmlVersion.HTML41_TRANSATIONAL; |
85 |
HtmlVersion.DEFAULT_VERSION_UNIT_TESTS_OVERRIDE = HtmlVersion.HTML41_TRANSATIONAL; |
85 |
} |
86 |
} |
86 |
|
87 |
|
|
|
88 |
@Override |
89 |
protected void tearDown() throws Exception { |
90 |
super.tearDown(); |
91 |
GSFPHPParser.setUnitTestCaretPosition(-1); |
92 |
} |
93 |
|
87 |
protected void reformatFileContents(String file, IndentPrefs indentPrefs, int initialIndent) throws Exception { |
94 |
protected void reformatFileContents(String file, IndentPrefs indentPrefs, int initialIndent) throws Exception { |
88 |
FileObject fo = getTestFile(file); |
95 |
FileObject fo = getTestFile(file); |
89 |
assertNotNull(fo); |
96 |
assertNotNull(fo); |
Lines 184-189
Link Here
|
184 |
} |
191 |
} |
185 |
|
192 |
|
186 |
TokenFormatter.setUnitTestCarretPosition(carretPosition); |
193 |
TokenFormatter.setUnitTestCarretPosition(carretPosition); |
|
|
194 |
GSFPHPParser.setUnitTestCaretPosition(carretPosition); |
187 |
doc.remove(0, doc.getLength()); |
195 |
doc.remove(0, doc.getLength()); |
188 |
doc.insertString(0, text, null); |
196 |
doc.insertString(0, text, null); |
189 |
doc.putProperty(TokenFormatter.TEMPLATE_HANDLER_PROPERTY, new Object()); |
197 |
doc.putProperty(TokenFormatter.TEMPLATE_HANDLER_PROPERTY, new Object()); |