File tree Expand file tree Collapse file tree 1 file changed +29
-8
lines changed
src/Magento/FunctionalTestingFramework/Util Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,37 @@ public function reset()
108
108
*/
109
109
public function printErrorSummary ()
110
110
{
111
+
111
112
if (is_array (array_keys ($ this ->errors ))) {
112
113
foreach (array_keys ($ this ->errors ) as $ type ) {
113
- print (
114
- PHP_EOL
115
- . 'ERROR: '
116
- . strval (count ($ this ->getErrorsByType ($ type )))
117
- . ' '
118
- . ucfirst ($ type )
119
- . " failed to generate or generated but with annotation errors "
120
- );
114
+ $ totalErrors = count ($ this ->getErrorsByType ($ type ));
115
+ $ totalAnnotationErrors = 0 ;
116
+ foreach ($ this ->getErrorsByType ($ type ) as $ entity => $ error ) {
117
+ if ($ error ['generated ' ] == true ) {
118
+ $ totalAnnotationErrors ++;
119
+ }
120
+ }
121
+ $ totalNotGenErrors = $ totalErrors - $ totalAnnotationErrors ;
122
+ if ($ totalNotGenErrors > 0 ) {
123
+ print (
124
+ PHP_EOL
125
+ . 'ERROR: '
126
+ . strval ($ totalNotGenErrors )
127
+ . ' '
128
+ . ucfirst ($ type )
129
+ . " failed to generate "
130
+ );
131
+ }
132
+ if ($ totalAnnotationErrors > 0 ) {
133
+ print (
134
+ PHP_EOL
135
+ . 'ERROR: '
136
+ . strval ($ totalAnnotationErrors )
137
+ . ' '
138
+ . ucfirst ($ type )
139
+ . " generated with annotation errors "
140
+ );
141
+ }
121
142
}
122
143
print (PHP_EOL );
123
144
}
You can’t perform that action at this time.
0 commit comments