use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.strings.CascadeStringReplacementInspector in project phpinspectionsea by kalessil.
the class CascadeStringReplacementInspectorTest method testIfFindsPhp74Patterns.
public void testIfFindsPhp74Patterns() {
final PhpLanguageLevel level = PhpLanguageLevel.parse("7.4");
if (level != null && level.getVersionString().equals("7.4")) {
PhpProjectConfigurationFacade.getInstance(myFixture.getProject()).setLanguageLevel(level);
final CascadeStringReplacementInspector inspector = new CascadeStringReplacementInspector();
inspector.USE_SHORT_ARRAYS_SYNTAX = true;
myFixture.enableInspections(inspector);
myFixture.configureByFile("testData/fixtures/api/strings/cascade-str-replace.74.php");
myFixture.testHighlighting(true, false, true);
myFixture.getAllQuickFixes().forEach(fix -> myFixture.launchAction(fix));
myFixture.setTestDataPath(".");
myFixture.checkResultByFile("testData/fixtures/api/strings/cascade-str-replace.74.fixed.php");
}
}
use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.strings.CascadeStringReplacementInspector in project phpinspectionsea by kalessil.
the class CascadeStringReplacementInspectorTest method testIfFindsAllPatterns.
public void testIfFindsAllPatterns() {
final CascadeStringReplacementInspector inspector = new CascadeStringReplacementInspector();
inspector.USE_SHORT_ARRAYS_SYNTAX = true;
myFixture.enableInspections(inspector);
myFixture.configureByFile("testData/fixtures/api/strings/cascade-str-replace.php");
myFixture.testHighlighting(true, false, true);
myFixture.getAllQuickFixes().forEach(fix -> myFixture.launchAction(fix));
myFixture.setTestDataPath(".");
myFixture.checkResultByFile("testData/fixtures/api/strings/cascade-str-replace.fixed.php");
}
Aggregations