Search in sources :

Example 1 with ArrayUniqueCanBeUsedInspector

use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.arrays.ArrayUniqueCanBeUsedInspector in project phpinspectionsea by kalessil.

the class ArrayUniqueCanBeUsedInspectorTest method testIfFindsAllPatterns.

public void testIfFindsAllPatterns() {
    final PhpLanguageLevel level = PhpLanguageLevel.parse("7.2");
    if (level != null && level.getVersionString().equals("7.2")) {
        PhpProjectConfigurationFacade.getInstance(myFixture.getProject()).setLanguageLevel(level);
        myFixture.enableInspections(new ArrayUniqueCanBeUsedInspector());
        myFixture.configureByFile("testData/fixtures/api/array-unique.php");
        myFixture.testHighlighting(true, false, true);
        myFixture.getAllQuickFixes().forEach(fix -> myFixture.launchAction(fix));
        myFixture.setTestDataPath(".");
        myFixture.checkResultByFile("testData/fixtures/api/array-unique.fixed.php");
    }
}
Also used : ArrayUniqueCanBeUsedInspector(com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.arrays.ArrayUniqueCanBeUsedInspector) PhpLanguageLevel(com.jetbrains.php.config.PhpLanguageLevel)

Aggregations

PhpLanguageLevel (com.jetbrains.php.config.PhpLanguageLevel)1 ArrayUniqueCanBeUsedInspector (com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.arrays.ArrayUniqueCanBeUsedInspector)1