@@ -31,45 +31,69 @@ public void setUp() throws Exception {
31
31
}
32
32
33
33
/**
34
- * Test for the absence of an error in the presence of
35
- * classes or interfaces specified for preferences.
34
+ * Test for an error for the "type" attribute because it is empty.
35
+ * <preference for="" type="Foo\Bar\Model\Logger"/>
36
36
*/
37
- public void testClassAttrForAndTypeAreExist () {
37
+ public void testAttrArgForValuesIsEmpty () {
38
38
configureFixture ();
39
39
40
- final String classOneExists = inspectionBundle .message (
41
- CLASS_DOES_NOT_EXIST ,
42
- EXISTENT_CLASS_ONE
40
+ final String forAttrIsEmptyMessage = inspectionBundle .message (
41
+ ARGUMENT_VALUE_IS_EMPTY ,
42
+ ModuleDiXml . TYPE_ATTR
43
43
);
44
44
45
- assertHasNoHighlighting (classOneExists );
45
+ assertHasHighlighting (forAttrIsEmptyMessage );
46
+ }
46
47
47
- final String classTwoExists = inspectionBundle .message (
48
- CLASS_DOES_NOT_EXIST ,
49
- EXISTENT_CLASS_TWO
48
+ /**
49
+ * Test for an error for the "for" attribute because it is empty.
50
+ * <preference for="Foo\Bar\Model\Logger" type=""/>
51
+ */
52
+ public void testAttrArgTypeValueIsEmpty () {
53
+ configureFixture ();
54
+
55
+ final String forAttrIsEmptyMessage = inspectionBundle .message (
56
+ ARGUMENT_VALUE_IS_EMPTY ,
57
+ ModuleDiXml .PREFERENCE_ATTR_FOR
50
58
);
51
59
52
- assertHasNoHighlighting ( classTwoExists );
60
+ assertHasHighlighting ( forAttrIsEmptyMessage );
53
61
}
54
62
55
63
/**
56
- * Test for throwing an error for a class that does not exist for the "for" attribute.
64
+ * Test for an no error for the "for" attribute because this class exists.
65
+ * <preference for="Foo\Bar\Model\Logger" type=""/>
57
66
*/
58
- public void testClassAttrForDoesNotExists () {
67
+ public void testAttrForClassExists () {
59
68
configureFixture ();
60
69
61
- final String forClassDoesNotExists = inspectionBundle .message (
62
- CLASS_DOES_NOT_EXIST ,
63
- NOT_EXISTENT_CLASS
70
+ final String typeAttrIsEmptyMessage = inspectionBundle .message (
71
+ ARGUMENT_VALUE_IS_EMPTY ,
72
+ ModuleDiXml . TYPE_ATTR
64
73
);
65
74
66
- assertHasHighlighting ( forClassDoesNotExists );
75
+ assertHasNoHighlighting ( typeAttrIsEmptyMessage );
67
76
}
68
77
69
78
/**
70
- * Test for throwing an error for a class that does not exist for the "type" attribute.
79
+ * Test for an no error for the "type" attribute because this class exists.
80
+ * <preference for="" type="Foo\Bar\Model\Logger"/>
71
81
*/
72
- public void testClassAttrTypeDoesNotExists () {
82
+ public void testAttrTypeClassExists () {
83
+ configureFixture ();
84
+
85
+ final String typeAttrIsEmptyMessage = inspectionBundle .message (
86
+ ARGUMENT_VALUE_IS_EMPTY ,
87
+ ModuleDiXml .PREFERENCE_ATTR_FOR
88
+ );
89
+
90
+ assertHasNoHighlighting (typeAttrIsEmptyMessage );
91
+ }
92
+
93
+ /**
94
+ * Test for throwing an error for a class that does not exist for the "for" attribute.
95
+ */
96
+ public void testClassAttrForDoesNotExists () {
73
97
configureFixture ();
74
98
75
99
final String forClassDoesNotExists = inspectionBundle .message (
@@ -81,49 +105,47 @@ public void testClassAttrTypeDoesNotExists() {
81
105
}
82
106
83
107
/**
84
- * Test for an error for the "type" attribute because it is empty and
85
- * there is no error "for" the for attribute because this class exists.
86
- * <preference for="Foo\Bar\Model\Logger" type=""/>
108
+ * Test for the absence of an error in the presence of
109
+ * classes or interfaces specified for preferences.
87
110
*/
88
- public void testForAttrArgsValuesIsEmpty () {
111
+ public void testClassAttrForIsExist () {
89
112
configureFixture ();
90
113
91
- final String forAttrIsEmptyMessage = inspectionBundle .message (
92
- ARGUMENT_VALUE_IS_EMPTY ,
93
- ModuleDiXml .PREFERENCE_ATTR_FOR
94
- );
95
-
96
- assertHasHighlighting (forAttrIsEmptyMessage );
97
-
98
- final String typeAttrIsEmptyMessage = inspectionBundle .message (
99
- ARGUMENT_VALUE_IS_EMPTY ,
100
- ModuleDiXml .TYPE_ATTR
114
+ final String classOneExists = inspectionBundle .message (
115
+ CLASS_DOES_NOT_EXIST ,
116
+ EXISTENT_CLASS_ONE
101
117
);
102
118
103
- assertHasNoHighlighting (typeAttrIsEmptyMessage );
119
+ assertHasNoHighlighting (classOneExists );
104
120
}
105
121
106
122
/**
107
- * Test for an error for the "for" attribute because it is empty and
108
- * there is no error "type" the for attribute because this class exists.
109
- * <preference for="" type="Foo\Bar\Model\Logger"/>
123
+ * Test for throwing an error for a class that does not exist for the "type" attribute.
110
124
*/
111
- public void testTypeAttrArgsValuesIsEmpty () {
125
+ public void testClassAttrTypeDoesNotExists () {
112
126
configureFixture ();
113
127
114
- final String forAttrIsEmptyMessage = inspectionBundle .message (
115
- ARGUMENT_VALUE_IS_EMPTY ,
116
- ModuleDiXml . TYPE_ATTR
128
+ final String forClassDoesNotExists = inspectionBundle .message (
129
+ CLASS_DOES_NOT_EXIST ,
130
+ NOT_EXISTENT_CLASS
117
131
);
118
132
119
- assertHasHighlighting (forAttrIsEmptyMessage );
133
+ assertHasHighlighting (forClassDoesNotExists );
134
+ }
120
135
121
- final String typeAttrIsEmptyMessage = inspectionBundle .message (
122
- ARGUMENT_VALUE_IS_EMPTY ,
123
- ModuleDiXml .PREFERENCE_ATTR_FOR
136
+ /**
137
+ * Test for the absence of an error in the presence of
138
+ * classes or interfaces specified for preferences.
139
+ */
140
+ public void testClassAttrTypeIsExist () {
141
+ configureFixture ();
142
+
143
+ final String classOneExists = inspectionBundle .message (
144
+ CLASS_DOES_NOT_EXIST ,
145
+ EXISTENT_CLASS_TWO
124
146
);
125
147
126
- assertHasNoHighlighting (typeAttrIsEmptyMessage );
148
+ assertHasNoHighlighting (classOneExists );
127
149
}
128
150
129
151
private void configureFixture () {
0 commit comments