use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.PropertyInitializationFlawsInspector in project phpinspectionsea by kalessil.
the class PropertyInitializationFlawsInspectorTest method testPropertyOverridePatterns.
public void testPropertyOverridePatterns() {
final PropertyInitializationFlawsInspector inspector = new PropertyInitializationFlawsInspector();
myFixture.enableInspections(inspector);
myFixture.configureByFile("testData/fixtures/codeStyle/property-initialization-override.php");
myFixture.testHighlighting(true, false, true);
}
use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.PropertyInitializationFlawsInspector in project phpinspectionsea by kalessil.
the class PropertyInitializationFlawsInspectorTest method testNullInitPatterns.
public void testNullInitPatterns() {
final PropertyInitializationFlawsInspector inspector = new PropertyInitializationFlawsInspector();
inspector.REPORT_INIT_FLAWS = true;
inspector.REPORT_DEFAULTS_FLAWS = true;
myFixture.enableInspections(inspector);
myFixture.configureByFile("testData/fixtures/codeStyle/property-null-initialization.php");
myFixture.testHighlighting(true, false, true);
myFixture.getAllQuickFixes().forEach(fix -> myFixture.launchAction(fix));
myFixture.setTestDataPath(".");
myFixture.checkResultByFile("testData/fixtures/codeStyle/property-null-initialization.fixed.php");
}
use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.PropertyInitializationFlawsInspector in project phpinspectionsea by kalessil.
the class PropertyInitializationFlawsInspectorTest method testTypedPropertiesPatterns.
public void testTypedPropertiesPatterns() {
final PhpLanguageLevel level = PhpLanguageLevel.parse("7.4");
if (level != null && level.getVersionString().equals("7.4")) {
PhpProjectConfigurationFacade.getInstance(myFixture.getProject()).setLanguageLevel(level);
myFixture.enableInspections(new PropertyInitializationFlawsInspector());
myFixture.configureByFile("testData/fixtures/codeStyle/property-initialization-typed-properties.php");
myFixture.testHighlighting(true, false, true);
}
}
use of com.kalessil.phpStorm.phpInspectionsEA.inspectors.apiUsage.PropertyInitializationFlawsInspector in project phpinspectionsea by kalessil.
the class PropertyInitializationFlawsInspectorTest method testClassReferenceResolvingPatterns.
public void testClassReferenceResolvingPatterns() {
final PropertyInitializationFlawsInspector inspector = new PropertyInitializationFlawsInspector();
myFixture.enableInspections(inspector);
myFixture.configureByFile("testData/fixtures/codeStyle/property-initialization-class-references.php");
myFixture.testHighlighting(true, false, true);
}
Aggregations