File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
app/code/Magento/ImportExport/Controller/Adminhtml/Import
dev/tests/static/testsuite/Magento/Test/Integrity Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,13 @@ public function execute()
106
106
$ fileSize = $ this ->sampleFileProvider ->getSize ($ entityName );
107
107
$ fileName = $ entityName . '.csv ' ;
108
108
109
- $ this ->fileFactory ->create (
109
+ return $ this ->fileFactory ->create (
110
110
$ fileName ,
111
- null ,
111
+ $ fileContents ,
112
112
DirectoryList::VAR_IMPORT_EXPORT ,
113
113
'application/octet-stream ' ,
114
114
$ fileSize
115
115
);
116
-
117
- $ resultRaw = $ this ->resultRawFactory ->create ();
118
- $ resultRaw ->setContents ($ fileContents );
119
-
120
- return $ resultRaw ;
121
116
}
122
117
123
118
/**
Original file line number Diff line number Diff line change @@ -57,13 +57,19 @@ public function testObserverHasNoExtraPublicMethods()
57
57
$ errors = [];
58
58
foreach (self ::$ observerClasses as $ observerClass ) {
59
59
$ reflection = (new \ReflectionClass ($ observerClass ));
60
+ $ publicMethodsCount = 0 ;
60
61
$ maxCountMethod = $ reflection ->getConstructor () ? 2 : 1 ;
62
+ $ publicMethods = $ reflection ->getMethods (\ReflectionMethod::IS_PUBLIC );
63
+ foreach ($ publicMethods as $ publicMethod ) {
64
+ if (!str_starts_with ($ publicMethod ->getName (), '_ ' )) {
65
+ $ publicMethodsCount ++;
66
+ }
67
+ }
61
68
62
- if (count ( $ reflection -> getMethods (\ReflectionMethod:: IS_PUBLIC )) > $ maxCountMethod ) {
69
+ if ($ publicMethodsCount > $ maxCountMethod ) {
63
70
$ errors [] = $ observerClass ;
64
71
}
65
72
}
66
- $ errors = array_diff ($ errors , [GetPriceConfigurationObserver::class]);
67
73
68
74
if ($ errors ) {
69
75
$ errors = array_unique ($ errors );
You can’t perform that action at this time.
0 commit comments