use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.ConstantCanBeUsedInspector in project phpinspectionsea by kalessil.
the class ConstantCanBeUsedInspectorTest method testIfFindsAllPatterns.
public void testIfFindsAllPatterns() {
myFixture.enableInspections(new ConstantCanBeUsedInspector());
myFixture.configureByFile("testData/fixtures/api/constants-usage.php");
myFixture.testHighlighting(true, false, true);
myFixture.getAllQuickFixes().forEach(fix -> myFixture.launchAction(fix));
myFixture.setTestDataPath(".");
myFixture.checkResultByFile("testData/fixtures/api/constants-usage.fixed.php");
}
use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.ConstantCanBeUsedInspector in project phpinspectionsea by kalessil.
the class ConstantCanBeUsedInspectorTest method testIfFindsOsFamilyPatterns.
public void testIfFindsOsFamilyPatterns() {
final PhpLanguageLevel level = PhpLanguageLevel.parse("7.3");
if (level != null && level.getVersionString().equals("7.3")) {
PhpProjectConfigurationFacade.getInstance(myFixture.getProject()).setLanguageLevel(level);
myFixture.enableInspections(new ConstantCanBeUsedInspector());
myFixture.configureByFile("testData/fixtures/api/constants-usage.php-os-family.php");
myFixture.testHighlighting(true, false, true);
}
}
Aggregations