test_class.file: sonar-php-plugin/src/test/java/org/sonar/plugins/php/PSR2ProfileDefinitionTest.java
test_class.identifier: PSR2ProfileDefinitionTest
test_case.body: @Test
    public void profile_creation() {
      PSR2ProfileDefinition definition = new PSR2ProfileDefinition();
      Context context = new Context();
      definition.define(context);
      BuiltInQualityProfile profile = context.profile("php", "PSR-2");
  
      assertThat(profile.language()).isEqualTo(Php.KEY);
      assertThat(profile.name()).isEqualTo("PSR-2");
      assertThat(profile.rules()).hasSize(20);
  
      BuiltInActiveRule lineLengthRule = profile.rule(RuleKey.of("php", "S103"));
      assertThat(lineLengthRule.overriddenParams()).isEmpty();
      assertThat(lineLengthRule.overriddenSeverity()).isNull();
  
      BuiltInActiveRule ruleS1788 = profile.rule(RuleKey.of("php", "S1788"));
      assertThat(ruleS1788.overriddenParams()).isEmpty();
      assertThat(ruleS1788.overriddenSeverity()).isEqualTo("CRITICAL");
  
      BuiltInActiveRule ruleS101 = profile.rule(RuleKey.of("php", "S101"));
      assertThat(ruleS101.overriddenParam("format").overriddenValue()).isEqualTo("^[A-Z][a-zA-Z]*$");
    }
test_case.class_method_signature: PSR2ProfileDefinitionTest.profile_creation()
test_case.full_signature: @Test public void profile_creation()
test_case.identifier: profile_creation
test_case.invocations: define profile isEqualTo assertThat language isEqualTo assertThat name hasSize assertThat rules rule of isEmpty assertThat overriddenParams isNull assertThat overriddenSeverity rule of isEmpty assertThat overriddenParams isEqualTo assertThat overriddenSeverity rule of isEqualTo assertThat overriddenValue overriddenParam
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void profile_creation()
focal_class.file: sonar-php-plugin/src/main/java/org/sonar/plugins/php/PSR2ProfileDefinition.java
focal_class.identifier: PSR2ProfileDefinition
focal_class.interfaces: implements BuiltInQualityProfilesDefinition
focal_class.class_method_signature: PSR2ProfileDefinition.define(Context context)
focal_class.full_signature: @Override public void define(Context context)
focal_class.identifier: define
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: void
focal_class.signature: void define(Context context)
focal_method.body: @Override
    public void define(Context context) {
      NewBuiltInQualityProfile profile = context.createBuiltInQualityProfile("PSR-2", Php.KEY);
      XmlProfileParser.parse("org/sonar/plugins/php/profile/psr2-profile.xml", profile);
      profile.done();
    }
focal_method.class_method_signature: PSR2ProfileDefinition.define(Context context)
focal_method.full_signature: @Override public void define(Context context)
focal_method.identifier: define
focal_method.invocations: createBuiltInQualityProfile parse done
focal_method.modifiers: @Override public
focal_method.parameters: (Context context)
focal_method.return: void
focal_method.signature: void define(Context context)