16
16
use Magento \Indexer \Model \Indexer \Collection ;
17
17
use Magento \Indexer \Model \Indexer \CollectionFactory ;
18
18
use Magento \Indexer \Model \Indexer \State ;
19
- use Magento \Indexer \Model \WorkingStateProvider ;
20
19
use Magento \Indexer \Model \Processor ;
21
20
use Magento \Indexer \Model \Processor \MakeSharedIndexValid ;
22
21
use PHPUnit \Framework \MockObject \MockObject ;
@@ -49,16 +48,9 @@ class ProcessorTest extends TestCase
49
48
*/
50
49
protected $ viewProcessorMock ;
51
50
52
- /**
53
- * @var WorkingStateProvider|MockObject
54
- */
55
- private $ workingStateProvider ;
56
51
57
52
protected function setUp (): void
58
53
{
59
- $ this ->workingStateProvider = $ this ->getMockBuilder (WorkingStateProvider::class)
60
- ->disableOriginalConstructor ()
61
- ->getMock ();
62
54
$ this ->configMock = $ this ->getMockForAbstractClass (
63
55
ConfigInterface::class,
64
56
[],
@@ -82,12 +74,19 @@ protected function setUp(): void
82
74
'' ,
83
75
false
84
76
);
77
+
78
+ $ indexerRegistryMock = $ this ->getIndexRegistryMock ([]);
79
+ $ makeSharedValidMock = new MakeSharedIndexValid (
80
+ $ this ->configMock ,
81
+ $ indexerRegistryMock
82
+ );
83
+
85
84
$ this ->model = new Processor (
86
85
$ this ->configMock ,
87
86
$ this ->indexerFactoryMock ,
88
87
$ this ->indexersFactoryMock ,
89
88
$ this ->viewProcessorMock ,
90
- $ this -> workingStateProvider
89
+ $ makeSharedValidMock
91
90
);
92
91
}
93
92
@@ -187,7 +186,6 @@ function ($elem) {
187
186
$ this ->indexerFactoryMock ,
188
187
$ this ->indexersFactoryMock ,
189
188
$ this ->viewProcessorMock ,
190
- $ this ->workingStateProvider ,
191
189
$ makeSharedValidMock
192
190
);
193
191
$ model ->reindexAllInvalid ();
0 commit comments