@@ -71,16 +71,15 @@ protected function setUp(): void
71
71
{
72
72
$ this ->moduleFileResolverMock = $ this ->getMockBuilder (FileResolverInterface::class)
73
73
->disableOriginalConstructor ()
74
- ->onlyMethods (['get ' ])
75
- ->getMockForAbstractClass ();
74
+ ->getMock ();
76
75
77
76
$ this ->designMock = $ this ->getMockBuilder (DesignInterface::class)
78
77
->disableOriginalConstructor ()
79
- ->onlyMethods (['getDesignTheme ' ])
80
- ->getMockForAbstractClass ();
78
+ ->getMock ();
81
79
82
80
$ this ->themeInterFaceMock = $ this ->getMockBuilder (ThemeInterface::class)
83
- ->getMockForAbstractClass ();
81
+ ->disableOriginalConstructor ()
82
+ ->getMock ();
84
83
85
84
$ this ->designMock ->expects ($ this ->once ())
86
85
->method ('getDesignTheme ' )
@@ -93,13 +92,13 @@ protected function setUp(): void
93
92
94
93
$ this ->customizationInterfaceMock = $ this ->getMockBuilder (CustomizationInterface::class)
95
94
->disableOriginalConstructor ()
96
- ->getMockForAbstractClass ();
95
+ ->getMock ();
97
96
98
97
$ this ->filesystemMock = $ this ->createPartialMock (Filesystem::class, ['getDirectoryRead ' ]);
99
98
100
99
$ this ->readInterfaceMock = $ this ->getMockBuilder (ReadInterface::class)
101
- ->disableOriginalConstructor ()
102
- -> getMockForAbstractClass ();
100
+ ->disableOriginalConstructor ()
101
+ -> getMock ();
103
102
104
103
$ this ->filesystemMock ->expects ($ this ->once ())
105
104
->method ('getDirectoryRead ' )
@@ -122,17 +121,19 @@ protected function setUp(): void
122
121
/**
123
122
* Test for get method with frontend scope.
124
123
*
125
- * @param string $filename
124
+ * @param string $scope
125
+ * @param string $fileName
126
126
* @param array $fileList
127
+ * @param string $themeFilesPath
127
128
*
128
129
* @return void
129
130
* @dataProvider providerGetFrontend
130
131
*/
131
- public function testGetFrontend (string $ scope , string $ filename , array $ fileList , string $ themeFilesPath ): void
132
+ public function testGetFrontend (string $ scope , string $ fileName , array $ fileList , string $ themeFilesPath ): void
132
133
{
133
134
$ this ->moduleFileResolverMock ->expects ($ this ->once ())
134
135
->method ('get ' )
135
- ->with ($ filename , $ scope )
136
+ ->with ($ fileName , $ scope )
136
137
->willReturn ($ fileList );
137
138
138
139
$ this ->customizationFactoryMock ->expects ($ this ->any ())
@@ -146,26 +147,27 @@ public function testGetFrontend(string $scope, string $filename, array $fileList
146
147
147
148
$ this ->readInterfaceMock ->expects ($ this ->once ())
148
149
->method ('isExist ' )
149
- ->with ($ themeFilesPath .'/etc/ ' .$ filename )
150
+ ->with ($ themeFilesPath .'/etc/ ' .$ fileName )
150
151
->willReturn (true );
151
152
152
153
$ this ->iteratorFactoryMock ->expects ($ this ->once ())
153
154
->method ('create ' )
154
155
->with (
155
156
[
156
- 'paths ' => array_reverse ([$ themeFilesPath .'/etc/ ' .$ filename ]),
157
+ 'paths ' => array_reverse ([$ themeFilesPath .'/etc/ ' .$ fileName ]),
157
158
'existingIterator ' => $ fileList
158
159
]
159
160
)
160
161
->willReturn ($ fileList );
161
162
162
- $ this ->assertEquals ($ fileList , $ this ->model ->get ($ filename , $ scope ));
163
+ $ this ->assertEquals ($ fileList , $ this ->model ->get ($ fileName , $ scope ));
163
164
}
164
165
165
166
/**
166
167
* Test for get method with global scope.
167
168
*
168
- * @param string $filename
169
+ * @param string $scope
170
+ * @param string $fileName
169
171
* @param array $fileList
170
172
*
171
173
* @return void
@@ -181,7 +183,7 @@ public function testGetGlobal(string $scope, string $fileName, array $fileList):
181
183
}
182
184
183
185
/**
184
- * Data provider for get glocal scope tests.
186
+ * Data provider for get global scope tests.
185
187
*
186
188
* @return array
187
189
*/
0 commit comments